早上好,
我有此代码可以在我的画廊中发布照片:
- (IBAction)postPhotoClick:(UIButton *)sender {
// Just use the icon image from the application itself. A real app would have a more
// useful way to get an image.
UIImage *img = [UIImage imageNamed:@"Icon-72@2x.png"];
// if it is available to us, we will post using the native dialog
BOOL displayedNativeDialog = [FBNativeDialogs presentShareDialogModallyFrom:self
initialText:nil
image:img
url:nil
handler:nil];
if (!displayedNativeDialog) {
[self performPublishAction:^{
[FBRequestConnection startForUploadPhoto:img
completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
[self showAlert:@"Photo Post" result:result error:error];
self.buttonPostPhoto.enabled = YES;
}];
self.buttonPostPhoto.enabled = NO;
//proceedToPost();
}];
}
}
但是,我需要将照片张贴在我朋友的画廊中。这是可能的?我怎么能这样做?