我尝试发帖给Feed,但她只在个人资料中显示。
如何在新闻Feed和个人资料Feed中显示此消息?
这是我的示例代码:
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];
如果我尝试使用没有params的帖子,则消息显示在:
[_facebook dialog:@"feed" andDelegate:self];
答案 0 :(得分:1)
试试这个:
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"some text", @"message",
nil];
[facebook requestWithGraphPath:@"/me/feed" andParams:params
andHttpMethod:@"POST" andDelegate:self];
我希望它有所帮助。 有关更多参数,请阅读post params
答案 1 :(得分:0)
抱歉,但这不显示对话框。
我通过删除并重新创建应用程序来解决。