davejohnson/phonegap-plugin-facebook-connect — Issue #98: app_id must be quoted when calling fb.init()
Author: mikepaterson
Created: 2012-02-16 04:34:47+00:00
State: open

app_id needs to be quoted when passed to fb.init() or else things explode with the following error:

-[__NSCFDictionary length]: unrecognized selector sent to instance
*** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: -[__NSCFDictionary length]: unrecognized selector sent to instance

bad times:
FB.init({ appId: 1234, nativeInterface: PG.FB });

good times:
FB.init({ appId: "1234", nativeInterface: PG.FB });

was confusing to track down. may be worth explicitly casting app_id to a string to make things little more fool proof or at least making note of it needing to be quoted in the documentation