如何使用FBSDKShareKit将图像和视频从iPhone应用程序共享到Facebook

时间:2015-09-25 13:23:26

标签: ios8

我是ios开发的新手,如何使用FBSDKShareKit从iphne应用程序分享图像和视频到Facebook。

    FBSDKSharePhoto *photo = [[FBSDKSharePhoto alloc] init];
    photo.image = [UIImage imageNamed:@"1.JPG"];
    photo.userGenerated = YES;
    FBSDKSharePhotoContent *content = [[FBSDKSharePhotoContent alloc] init];
    content.photos = @[[FBSDKSharePhoto photoWithImage:photo.image userGenerated:YES] ];
    //content.photos = @[photo];

    // Assuming self implements <FBSDKSharingDelegate>
    [FBSDKShareAPI shareWithContent:content delegate:nil];
任何人都可以帮助我。谢谢。

0 个答案:

没有答案