使用Facebook iOS SDK发布用户墙的链接 [英] Publishing links to user's wall using Facebook iOS SDK

查看:88
本文介绍了使用Facebook iOS SDK发布用户墙的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想要链接到Facebook上的用户墙上的链接,他已经使用新的Facebook iOS SDK登录。表现得好像用户从他的帐户发贴。例如,如果我在我的Facebook墙上发布了这个链接: http://www.apple.com/ ,我看不到链接。我会看到的是一个图像,一个具有实际url的标题和一个简短的描述。但是,当我从我的应用程序发布相同的链接时,我所看到的只是链接本身。



如何通过我的应用发布此网址,以便最终会出现在用户的墙是格式化的消息,如果他将从PC上的帐户发布,而不仅仅是链接本身作为字符串,那么它将会出现?



谢谢,

解决方案

编辑:以下代码适用于FB SDK的OLD版本



请在这里查看更多最新的答案,可能有助于 Facebook的sdk贴在iPhone应用程序的墙上



旧帖:



http://developers.facebook.com/docs/reference/dialogs/feed/

  NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys: 
kAppId,@app_id,
@http://developers.facebook.com/docs/reference/dialogs/,@link,
@http:// fblll.com/f8.jpg,@图片,
@Facebook对话框,@名称,
@参考文档,@标题,
@对话框为应用程序提供了一个简单,一致的界面,用于与用户进行交互。,@description,
@Facebook对话框非常简单!,@message,
nil];

[_facebook dialog:@feedandParams:params andDelegate:self];


I'm trying to publish a link to the user's wall on Facebook after he has already logged in using the new Facebook iOS SDK.

I want the link to behave as if the user posted it from his account. For example, if I post this link on my Facebook wall: http://www.apple.com/, I won't see the link. What I'll see is an image, a caption with the actual url and a short description. But when I publish this same link from my app, all I see is the link itself.

How can I publish this url through my app so that what will eventually appear on the user's wall is the formatted message as it would appear if he would have posted it from his account on the pc, and not just the link itself as a string?

Thanks,

解决方案

EDIT: The code below is for an OLD version of the FB SDK

Check here for a more up to date answer that may help Facebook sdk post on wall on iPhone app

OLD POST:

From http://developers.facebook.com/docs/reference/dialogs/feed/

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
  kAppId, @"app_id",
  @"http://developers.facebook.com/docs/reference/dialogs/", @"link",
  @"http://fbrell.com/f8.jpg", @"picture",
  @"Facebook Dialogs", @"name",
  @"Reference Documentation", @"caption",
  @"Dialogs provide a simple, consistent interface for apps to interact with users.", @"description",
  @"Facebook Dialogs are so easy!",  @"message",
  nil];

[_facebook dialog:@"feed" andParams:params andDelegate:self];

这篇关于使用Facebook iOS SDK发布用户墙的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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