Hi,
For all it’s worth I had the same problem with Google. After applying the hack you suggested here, it turned out I hadn’t enabled the Google+ API.
I know this could be irrelevant, because the OP’s question involves both Google and Facebook, but it might help someone.
As a side note, it might be worthwile keeping a log with the non-sensitive information returned into $result_obj
. A site admin could examine the log and resolve such issues a lot easier.
Just my 2c.