I try to post a photo to an album from an iOS app. I want users upload their photos to a fan page's specific album by their names, not page owner.
The problem is like the problem mentioned below:
Post a photo to an Album on a Facebook fan page without being the admin,
Post a photo to a page for iOS
Here are my code for post a photo
[params setObject:data forKey:@"source"];
FBRequest *request1 = [FBRequest requestWithGraphPath:@"v2.3/<album-id>/photos"
parameters:[NSDictionary dictionaryWithDictionary:params]
HTTPMethod:@"POST"];
And where I get the permissions
- (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI {
NSArray *permissions = [[NSArray alloc] initWithObjects:
@"publish_actions",
@"user_photos",
@"email",
@"user_likes",
@"publish_pages",
nil];
return [FBSession openActiveSessionWithPermissions:permissions
allowLoginUI:YES completionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
switch (status) {
case FBSessionStateOpen:
break;
case FBSessionStateClosed:
break;
case FBSessionStateCreated:
break;
case FBSessionStateCreatedOpening:
break;
case FBSessionStateClosedLoginFailed:
break;
case FBSessionStateOpenTokenExtended:
break;
case FBSessionStateCreatedTokenLoaded:
break;
}
}];
}
When I start the request , I will get the error and it said:
code = 200
"error_user_msg" = You don't have permission to edit this photo or album.
"error_user_title" = "Insufficient permissions"
"is_transient" = 0
message = "Permissions error"
I've read documents and it looks like you just need publish_actions this permissions and albums-id then you can post on album.But I just got error.
When I change album-id to page-id it will work but photo will not belong any albums.
Did I miss something or I misunderstand the documents?