从我的应用程序中,我可以发送照片,它会在时间轴上更新,但我的朋友都看不到它。我在我的应用程序列表中尝试了其他示例应用程序的密码并尝试发送照片。它很有魅力。谁能告诉FB秘密密码有什么问题?我授予了扩展权限:publish_stream photo_upload
[self performPublishAction:^{
[FBRequestConnection startForUploadPhoto:image
completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
if (!error) {
textView.text = result[@"id"];
NSLog(@"Posted : %@", result);
post_Photo.enabled = TRUE;
}
else
NSLog(@"Error : %@", error);
}];
}];
- (void) performPublishAction:(void (^)(void)) action {
if ([FBSession.activeSession.permissions indexOfObject:@"publish_stream"] == NSNotFound) {
[FBSession.activeSession requestNewPublishPermissions:@[@"publish_stream"]
defaultAudience:FBSessionDefaultAudienceFriends
completionHandler:^(FBSession *session, NSError *error) {
if (!error) {
action();
}
//For this example, ignore errors (such as if user cancels).
}];
} else {
action();
}
}