在 SDK 3.14 的用户 Facebook 提要中发布照片



在sdk 3.14中需要帮助在facebook上传/发布照片

大多数工作代码在旧的sdk版本中被弃用,我找不到一个简单的例子。

[EDIT]这是我目前的进度。

- (void) handleTakePictureTouch:(id)sender
{
    NSLog(@"Take Picture");
    UIImagePickerController *imagePicker =   [[UIImagePickerController alloc] init];
    if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
       [imagePicker setSourceType:UIImagePickerControllerSourceTypeCamera];
    else
        [imagePicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
    [imagePicker setDelegate:self];
    [self presentViewController:imagePicker animated:YES completion:nil];
}

- (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    [picker dismissViewControllerAnimated:YES completion:nil];
    UIImage *img    =   [info objectForKey:UIImagePickerControllerOriginalImage];
    [self.imgvPhoto setImage:img];
}

- (void) handleShareFacebook:(id)sender
{
    NSLog(@"Share FB");
}

在阅读文档后,我发现了一个示例共享在facebook sdk 3.14.x

here: https://github.com/fbsamples/ios-howtos/blob/master/FBShareSample/FBShareSample/ShareViewController.m

相关内容

  • 没有找到相关文章

最新更新