从iphone发布到墙上时如何在Facebook描述字段中插入链接?

时间:2012-01-18 11:10:12

标签: iphone ios facebook-graph-api facebook

从iphone发布到用户墙时,如何在DESCRIPTION字段中发布链接?

我想添加“来自XXXX iphone app”的内容//当用户点击它时会将他带到应用程序商店。

感谢。

更新: 在我理解了“动作链接”的选项之后,我有了我的代码的动作链接。使用链接,用户可以访问appstore。

行。我知道了 ! ,多亏了你,我看到了什么是actionlink概念。

我对param数组的参数是:

NSDictionary * actionLinks =[NSArray arrayWithObjects:[NSDictionary dicationaryWithObjectsAndKeys:@"My     Action Name",@"name",@"http://myactionurl.com",@"link",nil],nil];

SBJsonWriter *_jsonWriter = [[SBJsonWriter alloc]init];
NSString *actionLinksString =[_jsonWriter stringWithObject:actionLinks];

MSMutableDictionary *dicInfoToShare = [NSMutableDictionaryWithObjectsAndKeys:
@"www.youtubelink.com",@"link",
@"the name",@"name",
@"the caption",@"caption",
@"the description",@"description",
actionLinksString, @"actions", nil]; // <---the addition

3 个答案:

答案 0 :(得分:0)

当您通过在Facebook注册的应用从iphone发布时,这不是自动的吗?

答案 1 :(得分:0)

    FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease];
dialog.actionLinks = @"[{\"text\":\"YourAppropriate Content!\",\"href\":\"http://www.YourAppropriateContent.com/\"}]";

我在我的应用中完成了以下操作。 它有效。

最好有动作链接,因为它们显示在post..always

之下

这适用于较旧的Facebook API。如果您正在实施它。 试试这个.. http://www.raywenderlich.com/77/how-to-post-on-facebook-with-your-iphone-app

答案 2 :(得分:0)

你在这里看不到什么奇怪的东西?

NSDictionary * actionLinks = [ NSArray [NSDictionary dicationaryWithObjectsAndKeys ...