在iOS SDK 3.1上发布iOS 6原生支持 [英] Issue with iOS 6 native support on Facebook SDK 3.1

查看:87
本文介绍了在iOS SDK 3.1上发布iOS 6原生支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的一个应用程序中使用了Facebook SDK 3.0,一切正常。正在将用户重定向到Facebook应用程序(如果已安装)或移动网站(如果没有)。



上周,我将新的SDK 3.1集成到与Facebook帐户本机集成。为此,我从:

  [FBSession openActiveSessionWithPermissions:permissions 
allowLoginUI:YES
completionHandler:^ (FBSession * session,FBSessionState status,NSError * error){
/ *我的代码在这里* /

}];

现在不推荐使用新的:

  [FBSession openActiveSessionWithPublishPermissions:permissions 
defaultAudience:FBSessionDefaultAudienceFriends
allowLoginUI:YES
completionHandler:^(FBSession * session,FBSessionState status,NSError * error){
/ *我的代码在这里* /

}];

在iOS 5上,没有改变,完美。在iOS 6上,它在我的设备上工作,但是我有一些用户报告说系统要求他们的权限,但是他们无法连接。



而且我的有一个视频,当系统要求Facebook权限时,甚至点击确定,该应用程序不能访问该帐户,甚至没有在系统偏好设置中注册。



以下是视频: http://www.youtube.com/watch?v=JUHF9KNNg6M



如果我从系统中删除帐户,一切都像以前在Facebook SDK 3.0中所预期的一样。


$ b $有人也遇到这个问题吗?或者你有什么想法可以解决这个问题吗?

解决方案



iOS 6内置的认证对话框为开发人员提供了一种本地方式,在他们的应用中使用Facebook登录,而无需进行快速应用切换。 iOS 6本地认证,应用程序需要更改他们向用户请求权限的方式 - 应用程序必须分离其读取和写入权限的请求。iOS SDK的SDK SDK支持这些功能,并帮助开发人员使用它们构建适用于多个iOS版本的应用程序,设备配置。



https ://developers.facebook.com/docs/howtos/ios-6/


I was using the Facebook SDK 3.0 in one of my Apps, and everything was working fine. It was redirecting the user to the Facebook app if installed or to the mobile website if not.

Last week I integrated the new SDK 3.1 to have native integration with the Facebook account. To do this I moved from:

[FBSession openActiveSessionWithPermissions:permissions
                               allowLoginUI:YES
                          completionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
    /* My code here */

}];

Which is now deprecated to the new:

[FBSession openActiveSessionWithPublishPermissions:permissions
                                   defaultAudience:FBSessionDefaultAudienceFriends
                                      allowLoginUI:YES
                                 completionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
    /* My code here */

}];

On iOS 5, nothing changed, perfect. On iOS 6 it worked on my device, but I got some users who report that the system was asking them permissions but they where not able to connect.

And indeed, I have a video, where even clicking "Ok" when the system ask for Facebook permissions, the app do not get access to the account, and is not even registered in the System Preferences.

Here is the video: http://www.youtube.com/watch?v=JUHF9KNNg6M

If I remove the account from the system, everything works like previously expected on the Facebook SDK 3.0.

Has someone also encountered this issue? Or do you have any idea how this can be fixed?

解决方案

Did you separate your permission requests?

"The Auth Dialog built into iOS 6 gives developers a native way to use Facebook Login in their apps without having to make a fast-app-switch. Note, to use iOS 6 native auth, apps need change the way they request permissions from users - apps must separate their requests for read and write permissions. The Facebook SDK for iOS supports these features and helps developers use them to build apps that work on multiple iOS versions and device configurations."

https://developers.facebook.com/docs/howtos/ios-6/

这篇关于在iOS SDK 3.1上发布iOS 6原生支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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