1

我正在尝试使用 facebook 展示 een 照片上传的进度。上传工作正常。但我不知道如何显示进度。

当前的上传代码是这样的:

- (IBAction)delenFacebook:(id)sender {

  NSLog(@"share image");
  UIImage *img = _postImage.image;

  // 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];

                               }];


    }];
  }
}
4

0 回答 0