如何将图像共享到Facebook,链接回到Instagram等网站/应用程序中的内容页面?

时间:2015-12-02 11:11:33

标签: ios facebook facebook-graph-api facebook-ios-sdk facebook-sdk-4.x

我正在构建一个iOS应用程序,允许用户创建某种类型的图像,当用户完成这样做时,他们可以选择自动在Facebook时间线上发布它。

我可以自动发布到用户的时间线,因为用户允许我们的应用程序使用publish_permission。我让我的应用程序将用户创建的图像发布到他们的Facebook时间线。它顺利出去了。图像显示在Facebook上,并显示该图像由我的应用程序创建。但是当用户点击应用程序名称到我的内容页面时,我无法提供链接。我怎样才能做到这一点 ?我看到Instagram有这个功能,它应该推动我们的应用程序更多的参与。这是Instagram如何执行此操作的屏幕截图enter image description here

这是我的应用程序显示它的方式 enter image description here

这是我在iOS应用中将图片发布到用户时间轴的代码

FBSDKSharePhoto *photo = [[FBSDKSharePhoto alloc] init];
photo.image = [UIImage imageWithData:,myImage];
photo.userGenerated = YES;

 NSURL *URL =  [NSURL URLWithString:[NSString stringWithFormat:@"http://www.myWebsite.com/profile/%@/item/xxxx]];

photo.caption = [NSString stringWithFormat:@"%@%@ Created by xxx"];
photo.userGenerated = YES;
photo.imageURL = URL;

FBSDKSharePhotoContent *content = [[FBSDKSharePhotoContent alloc] init];
content.photos = @[photo];    
[FBSDKShareAPI shareWithContent:content delegate:self];

我是否需要使用opengraph或其他任何东西?请帮忙。 提前致谢

0 个答案:

没有答案