Add facebook permission after initial authorize with iOS SDK?

How can i add permission after the initial [facebook authorize:permissions] with the facebook-ios-sdk?

The main purpose of the app is posting on the facebook wall, but if the user activates an option the app needs more permission and should ask the user again?

But if i try to use the authorize method from the facebook-ios-sdk with different permissions, the sso from facebook says only that this app is already authorized (but the permission stay on that from the first authorization)

Any ideas?


Simply calling [facebook authorize:permissions] a second time with a superset array for permissions should do the trick.

The second time authorize: is called, you'll get a different Facebook SSO screen where only the new permission(s) are shown in the "Using this app requires:" list.

Note: Make sure your second call to authorize: is not predicated on [self.facebook isSessionValid] returning false , because it'll most likely be returning true .

Edit:

This is the first FB screen I get with no pre-existing permissions and I'm asking for (@"email", @"publish_stream", @"publish_actions"):

第一授权

Now, I get this later on when I ask for these permissions (@"email", @"publish_stream", @"publish_actions", @"user_photos" ):

第二授权

链接地址: http://www.djcxy.com/p/35470.html

上一篇: 这个应用程序的开发人员还没有正确地设置这个应用程序的Facebook登录?

下一篇: 在iOS SDK初始授权后添加facebook权限?