适用于iOS的Facebook SDK,适用于iOS 4.0设备 [英] Facebook SDK for iOS , on iOS 4.0 device

查看:151
本文介绍了适用于iOS的Facebook SDK,适用于iOS 4.0设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Facebook SDK文档表明此SDK可在iOS 4.0及更高版本上运行。然后我在iPhone 3GS iOS 4.0设备上测试了他们的Scrumptions示例。但似乎这个应用程序不起作用。尽管我已经登录,它仍然向我显示登录屏幕。

Facebook SDK documents indicates that this SDK will work on iOS 4.0 and later. Then I tested their Scrumptions sample on a iPhone 3GS iOS 4.0 device. But it seems this application doesn't work. It keeps showing me the login screen although I logged in.

然后我调试并注意到 FBSessionState 总是返回 FBSessionStateClosedLoginFailed
它永远不会返回 FBSessionStateOpen

Then I debugged and noticed FBSessionState always returnsFBSessionStateClosedLoginFailed. It never returns FBSessionStateOpen.

可能是什么原因?但是,当我在iOS 5.1模拟器中运行它时它工作正常。是因为SDK不支持iOS 4.0或其他一些问题吗?

What could be the reason? However when I run this in iOS 5.1 emulator it works fine. Is it because SDK doesn't support iOS 4.0 or some other issue?

推荐答案

您是否声明了

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url;

第一个是iOS 4.2及更高版本因此,如果您的设备使用4.2之前的版本运行,则将使用第二种方法。

The first one is iOS 4.2 and later so if your device is running with a version prior 4.2,the second method will be used instead.

这篇关于适用于iOS的Facebook SDK,适用于iOS 4.0设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆