共享图像蚂蚁文字Facebook SDK 4.0 iOS [英] Share image ant text Facebook SDK 4.0 iOS

查看:44
本文介绍了共享图像蚂蚁文字Facebook SDK 4.0 iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试与Facebook的新SDK 4.0共享图像和文本,但是我无法做到这一点.要共享图像,我需要以下代码:

I'm trying to share an image and a text with the new SDK 4.0 of Facebook but I'm unable to do it. To share an image I have this code:

FBSDKSharePhoto *photo = [[FBSDKSharePhoto alloc] init];
photo.image = imageFinal;
photo.userGenerated = YES;

FBSDKSharePhotoContent *content = [[FBSDKSharePhotoContent alloc] init];
content.photos = @[photo];

[FBSDKShareDialog showFromViewController:self withContent:content delegate:self];

这很好用,但是我找不到与该图像共享文本的方法.我已经找到了如何与 FBSDKShareLinkContent 共享文本,但是它也不能共享图像.

This works fine, but I don't find the method to share with this image a text. I have found how to share a text with FBSDKShareLinkContent, but it doesn't serve to share an image too.

有人可以帮助我吗?

谢谢大家.

推荐答案

这是因为Facebook允许开发人员选择要共享的图像,但是Facebook用户是唯一允许在共享视图中设置该图片描述的用户.控制器.

This is because Facebook allows the developer to pick what image to share but the Facebook user is the only one allowed to set the description of that picture in the share view controller.

这篇关于共享图像蚂蚁文字Facebook SDK 4.0 iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆