Question

I am using Unity Facebook SDK 5.1 and Unity version is 4.3.0. I am testing on iPhone 4 device which don't have facebook app installed. I have integrated SDK inside my game.

When i try to login into facebook using my app first it opens the FB login page inside browser,after login it ask me for authorization when i press "Ok" it takes me to my app. Inside LoginCallBack method i got the following response

FBResult.Text =
{"is_logged_in":false,"user_id":"","access_token":"NOT_USED_ON_IOS_FACEBOOK","access_token_expires_at":"01/01/0001 00:00:00"} .

Many Thanks Sachet

Was it helpful?

Solution

Make sure that your URLSchemeSuffix in your Info.plist is correct (fb[appid]) and that the handleOpenURL call (in your generated XCode project) is making it back to facebook.

I had the very same problem where another plugin was capturing the handleOpenURL call when i was returning from facebook after authorizing the app and it was preventing the handleOpenURL response from making it all the way back to the facebook plugin.

You can test it by putting a breakpoint in the Facebook/FbUnityInterface.mm file @

- (BOOL)openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication

If this isn't being hit, it's likely another openURL handler is getting the response first and not handing it back to super.

OTHER TIPS

I got the same error but for different reasons using iOS native login.

I checked the URLScheme, add some breakpoints in the different OpenUrl but got nothing. Turns out I was logging with the "publish_actions" permissions. The message meant that this was not supported by iOS native implementation I suppose.

I regret the message not being helpful but you should pay attention to the requested permissions at login and ask them later using the graph API.

Hope that will help people having the same issue.

I got the same error. Reason was in incorrect bundle id (we used different bundle ids for release and development builds). Then we added this bundle id to Facebook App's Settings page, and the error gone.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top