开发者

Facebook Graph API; different behavior on simulator and device

开发者 https://www.devze.com 2023-03-02 08:19 出处:网络
I dev开发者_如何转开发eloped a game for iPad using SDK 4.2. I am using latest Facebook Graph API to publish score on Facebook wall but have disabled opening Safari for authentication by changing in me

I dev开发者_如何转开发eloped a game for iPad using SDK 4.2. I am using latest Facebook Graph API to publish score on Facebook wall but have disabled opening Safari for authentication by changing in method:

- (void)authorizeWithFBAppAuth:(BOOL)tryFBAppAuth
                safariAuth:(BOOL)trySafariAuth {
   trySafariAuth = YES; //changed to 
   trySafariAuth = NO;
}

It works well on Simulator by opening login dialog inside the app but on device (iPad) it opens Safari and the application goes in the background. While tracing through debugger, I found that:

didOpenOtherApp = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:fbAppUrl]];

in the same method is 'YES' when run on device and 'NO' when run on simulator. This difference is causing difference in behavior. How can it be resolved? I need to use in-app authorization.


Never mind. Here is the solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消