Reputation: 405
For some reason I am constantly getting a single permission of 'basic information' when authorizing my application. This is my code:
- (void)login {
if (![facebook isSessionValid]) {
NSArray *permissions = [NSArray arrayWithObjects:@"offline_access",@"publish_stream",nil];
[facebook authorize:permissions];
}
}
Can anyone help me out? I'm needing post permissions and location permissions.
Upvotes: 2
Views: 8358
Reputation: 14298
I think that "offline_access" permission is not prompted when you ask to authorize the app. All it does is just extend the expiration date to be "long-lived" than normal. So, imo, it is not really a permission to ask.
I think post permissions is already granted even you send an empty permission. I can send feeds by just using [facebook authorize:nil];. But you won't be able to use the "message" field for nil permission, (facebook will ignore it). For that you need "publish_stream" permission.
As for location permissions, you need "user_location" to do that. See http://developers.facebook.com/docs/reference/api/permissions/ for list of permissions.
Hope this helps :)
Upvotes: 0
Reputation: 1965
Try this,It should work
- (void)login {
if (![facebook isSessionValid]) {
NSArray *permissions = [NSArray arrayWithObjects:@"user_photos",@"user_videos",@"publish_stream",@"offline_access",@"user_checkins",@"friends_checkins",@"email",@"user_location" ,nil];
[facebook authorize:permissions];
}
}
Upvotes: 2