Hey there,
Calling FacebookPlugin.api() when there is no internet connection throws an error when parsing the JSON response object.
If there is no internet connection when calling the api, the unparsed response is the following string (in Android):
{"error_message":"java.net.UnknownHostException: Unable to resolve host "graph.facebook.com": No address associated with hostname"}
If you pay close attention, the quotes in "graph.facebook.com" make the message unable to parse as a JSON object. And effectively, instead of getting that nice error message, I get the following error:
JS: assets/jsb_pluginx.js:166:SyntaxError: JSON.parse: expected ',' or '}' after property value in object at line 1 column 74 of the JSON data
I’ve only tested this in Android, but other platforms may be affected by this bug as well.
I’m using Cocos2D JS v3.5.