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