Facebook ios-sdk:提要帖子不显示在动态消息上
我尝试发布一条消息来供稿,但她只显示在个人资料中。
如何使此消息显示在新闻源和个人资料源上?
这是我的示例代码:
SBJSON *jsonWriter = [[SBJSON new] autorelease];
NSDictionary* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
_gameName,@"text",_gameLink,@"href", nil], nil];
NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
NSDictionary* imageShare = [NSDictionary dictionaryWithObjectsAndKeys:
@"image", @"type",
_imageURL, @"src",
_gameLink, @"href",
nil];
NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
title_, @"name",
//@"teste", @"caption",
_msg, @"description",
[NSArray arrayWithObjects:imageShare, nil ], @"media",
_gameLink, @"href", nil];
NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Share on Facebook", @"user_message_prompt",
actionLinksStr, @"action_links",
attachmentStr, @"attachment",
nil];
[_facebook dialog:@"feed" andParams:params andDelegate:self];
如果我尝试使用不带参数的方式发布,则消息会显示在两者中:
[_facebook dialog:@"feed" andDelegate:self];
I try to post a message to feed, but her show only in profile.
How to do make this message show on news feed and profile feed?
This is my sample code:
SBJSON *jsonWriter = [[SBJSON new] autorelease];
NSDictionary* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
_gameName,@"text",_gameLink,@"href", nil], nil];
NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
NSDictionary* imageShare = [NSDictionary dictionaryWithObjectsAndKeys:
@"image", @"type",
_imageURL, @"src",
_gameLink, @"href",
nil];
NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
title_, @"name",
//@"teste", @"caption",
_msg, @"description",
[NSArray arrayWithObjects:imageShare, nil ], @"media",
_gameLink, @"href", nil];
NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Share on Facebook", @"user_message_prompt",
actionLinksStr, @"action_links",
attachmentStr, @"attachment",
nil];
[_facebook dialog:@"feed" andParams:params andDelegate:self];
If I try to post using without params, the message show in both:
[_facebook dialog:@"feed" andDelegate:self];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
试试这个:
我希望它有帮助。
有关更多参数,请阅读 post params
Try this:
I hope it is help.
For more parameters read post params
抱歉,这不显示对话框。
我通过删除并重新创建应用程序来解决。
Sorry, but this don't show dialog box.
I solved by deleting and recreating the application.