开发者

Facebook Graph API; different behavior on simulator and device

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜