Reputation: 4130
Working on iPhone application for facebook integration, i have already taken some of the permissions from the user as follow :
data = ( { "basic_info" = 1; email = 1; "friends_birthday" = 1; "friends_photos" = 1; installed = 1; "public_profile" = 1; "user_birthday" = 1; "user_friends" = 1; "user_location" = 1; "user_photos" = 1; } );
Now I need one more permission from the user to post on his/her wall and that is publish_actions
I am using following code for gaining the user permission :
NSArray *permissionsNeeded = @[@"publish_actions"];
[FBSession.activeSession requestNewReadPermissions:permissionsNeeded
completionHandler:^(FBSession *session, NSError *error) {
if (!error) {
[self makeRequestForPostOnMyWall];
} else {
NSLog(@"error %@", error.description);
}
}];
now it gives an error as follow :
FBSDKLog: FBSession: a permission request for read permissions contains unexpected publish or manage permissions
By googling i came to know that you can not request these three permission togather namely "email,user_photos and publish_actions". But I need these three persmission and don't know how to do that, if any one knows has a solution for this then please help me. thanks in advance.
Upvotes: 0
Views: 753
Reputation: 5148
with @"publish_actions" action you need use requestNewPublishPermissions
not use requestNewReadPermissions
. and something else like email,user_photos, basicInfo you can request with requestNewReadPermissions
Upvotes: 3