我尝试发布消息来供稿,但她只显示在个人资料中。
如何使此消息显示在新闻源和个人资料源上?
这是我的示例代码:
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];
最佳答案
试试这个:
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"some text", @"message",
nil];
[facebook requestWithGraphPath:@"/me/feed" andParams:params
andHttpMethod:@"POST" andDelegate:self];
希望对您有帮助。 有关更多参数,请阅读 post params
关于ios - Facebook ios-sdk : feed post don't show on News Feed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4898629/