简体   繁体   English

IOS在没有Facebook Connect-Api的情况下将照片发布到Facebook

[英]IOS Post Photo To Facebook Without The Facebook Connect-Api

Is it possible to post a photo to a Facebook Page wall without using the Facebook connect Api? 是否可以在不使用Facebook连接Api的情况下将照片发布到Facebook页面墙?

To post some text I tried using this: 要发布一些文本,我尝试使用此文本:

NSString *post = [NSString stringWithFormat:@"fb://publish/profile/1111111111112311?text=%@",@"some text here"];
NSURL *url = [NSURL URLWithString:post];

thanks 谢谢

To do this, I would suggest using Sharekit. 为此,我建议使用Sharekit。 ShareKit is a free api that allows you to intregrate many sharing feastures for many services, with minimal code (less than 20 lines). ShareKit是一个免费的API,允许您使用最少的代码(少于20行)为许多服务整理许多共享盛宴。

Here is a link to get ShareKit: getsharekit.com 这是获取ShareKit的链接: getsharekit.com

To share a photo on Facebook with Sharekit, do this: 要使用Sharekit在Facebook上共享照片,请执行以下操作:

  1. Add sharekit to your project by coping the files found at the link above 通过复制上面链接中找到的文件,将sharekit添加到您的项目中
  2. Use the following code to set up the share instance: 使用以下代码来设置共享实例:

     UIImage *image = [UIImage imageNamed:@"someImage.jpg"]; SHKItem *item = [SHKItem image:image title:@"Look at this picture!"]; 
  3. Then just share the image with this: 然后,只需与此共享图像:

     [SHKFacebook shareItem:item]; 

However, the newest Facebook API is actually pretty easy to use. 但是,最新的Facebook API实际上非常易于使用。 And it's very well documented, so you might want to check it out. 并且它有很好的文档记录,因此您可能需要查看它。 There are some benefits to using Facebook's actually API, rather then use a proxy service. 使用Facebook的实际API有一些好处,而不是使用代理服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM