I need to make a post on a my own fanpage as the admin. I created this code hopping that passing the id of the page "fbPageID" would leave the post on that page, but it actually leaves the post on my profile.
NSArray *publishPerms = @[@"manage_pages",@"publish_actions", @"publish_stream"];
[FBSession openActiveSessionWithPublishPermissions:publishPerms defaultAudience:FBSessionDefaultAudienceEveryone allowLoginUI:NO completionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
if (session.isOpen) {
[FBRequestConnection startForPostStatusUpdate:self.textBox.text place:fbPageID tags:nil completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
if (error){
NSLog(@"error %@",error);
}
else{
NSLog(@"POSTED %@",result);
}
}];
}
else{
NSLog(@"session not open");
}