附件不在Facebook上发布

时间:2011-12-06 10:58:45

标签: iphone facebook

我正在从网络服务中找到一些文字,需要在facebook的墙上发布该文字。

我的文字是这样的。

Wall Street traders who make bets with a firm's own money usually have at least several sets of bosses looking over their shoulder.At MF Global Holdings Ltd., where <phrase name="Corzine, Jon S." significance="PROMINENT" type="PERSON" vrtysux="PERSON|Corzine, Jon S.">Jon S. Corzine</phrase> made $6.3 billion in trades on European sovereign debt that sank the company last month, a different set of rules applied.

在尝试将其作为标题发布时,它不会发布。

但如果它是纯文本,那么它发布得很好。

这是发布标题的代码,带链接的消息。

dialog.attachment = [NSString stringWithFormat:@"{\"name\":\"%@\",\"href\":\"%@\",\"caption\":\"%@\"}", postTitle,postTitleLink, postMessage];

我认为文字的格式是问题,如果它可以任何人请告诉我如何解决它,如果它不是可能是什么问题。

提前感谢你。

1 个答案:

答案 0 :(得分:0)

像这样使用: NSString * description = [NSString stringWithFormat:@“华尔街交易员用公司自有资金下注通常至少有几套老板看着他们的肩膀。在MF Global Holdings Ltd.,Jon S. Corzine赚了63亿美元上个月沉没公司的欧洲主权债务交易,采用了一套不同的规则。“];

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               APP_ID, @"app_id",
                               @"Test Posting",@"name",
                               @"www.google.com", @"link",
                               description, @"description",nil];

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

**如果您的链接包含双引号,则必须将其转换为utf8字符串,然后添加到参数中。