Unable to log into Facebook on iOS using build 1031.

On Android it still works fine, but on iOS we get an error:

“attempt to index global ‘facebook’ (a nil value)”

even though we’ve required facebook already.

We’ve also tried: local facebook = require("facebook")
just to be sure, and that gives this error:

“FBSession: No AppID provided; either pass an AppID to init, or add a string valued key with the appropriate id named FacebookAppID to the bundle *.plist”

We already pass the app ID in though via: facebook.login( appId, callFacebook)

This worked before, and I know that build 1028 had this fix:
“iOS: Reworked Facebook implementation to work better with FBConnect SDK v3.1.1. Verified against sample code and casenum: 20794.”

Do we have to do anything different in our implementation for iOS now? The docs are exactly the same as before. Speaking of which, I found a few weeks ago that my login only worked if I removed the publish_stream from the login request, but in the docs it still shows as facebook.login( appId, listener, {"publish\_stream"} ). Maybe I did something wrong, but possibly the docs need updating. [import]uid: 84115 topic_id: 36026 reply_id: 336026[/import]

Scrap that. More searching has turned up this post:

http://web-c1.anscamobile.com/forum/2013/02/14/facbook-login-fbconnect-sdk-v311-corona-v-20131028

where Naomi’s answer shows that we need to add this now:

plist=
{
–this line here, just the app ID, no need to add the “fb” prefix like we do in the CFBundleURLSchemes
FacebookAppID = “xxxxxxxxxxxxxx”,

CFBundleURLTypes =
{
{
CFBundleURLSchemes =
{
“fbxxxxxxxxxxxxxx”,
},
},
},
}, [import]uid: 84115 topic_id: 36026 reply_id: 143162[/import]

Scrap that. More searching has turned up this post:

http://web-c1.anscamobile.com/forum/2013/02/14/facbook-login-fbconnect-sdk-v311-corona-v-20131028

where Naomi’s answer shows that we need to add this now:

plist=
{
–this line here, just the app ID, no need to add the “fb” prefix like we do in the CFBundleURLSchemes
FacebookAppID = “xxxxxxxxxxxxxx”,

CFBundleURLTypes =
{
{
CFBundleURLSchemes =
{
“fbxxxxxxxxxxxxxx”,
},
},
},
}, [import]uid: 84115 topic_id: 36026 reply_id: 143162[/import]

Scrap that. More searching has turned up this post:

http://web-c1.anscamobile.com/forum/2013/02/14/facbook-login-fbconnect-sdk-v311-corona-v-20131028

where Naomi’s answer shows that we need to add this now:

plist=
{
–this line here, just the app ID, no need to add the “fb” prefix like we do in the CFBundleURLSchemes
FacebookAppID = “xxxxxxxxxxxxxx”,

CFBundleURLTypes =
{
{
CFBundleURLSchemes =
{
“fbxxxxxxxxxxxxxx”,
},
},
},
}, [import]uid: 84115 topic_id: 36026 reply_id: 143162[/import]

Scrap that. More searching has turned up this post:

http://web-c1.anscamobile.com/forum/2013/02/14/facbook-login-fbconnect-sdk-v311-corona-v-20131028

where Naomi’s answer shows that we need to add this now:

plist=
{
–this line here, just the app ID, no need to add the “fb” prefix like we do in the CFBundleURLSchemes
FacebookAppID = “xxxxxxxxxxxxxx”,

CFBundleURLTypes =
{
{
CFBundleURLSchemes =
{
“fbxxxxxxxxxxxxxx”,
},
},
},
}, [import]uid: 84115 topic_id: 36026 reply_id: 143162[/import]