我有这个功能
-(void)feed_post:(NSString *)message andDelegate:(id<FBRequestDelegate>)delegate{
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
message, @"message",
nil];
[facebook requestWithGraphPath:@"/me/feed" andParams:params
andHttpMethod:@"POST" andDelegate:delegate];
}
将消息发布到用户的墙上。一切正常,但帖子只能由我看到。它似乎是作为自己的私人消息发布。我应该如何配置params以更改帖子可见性?感谢。
答案 0 :(得分:2)
这就是诀窍。我也不得不删除cookie。
NSDictionary *dictPrivacy = [NSDictionary dictionaryWithObjectsAndKeys:@"EVERYONE",@"value", nil];
SBJSON *jsonWriter = [[SBJSON new] autorelease];
NSString *strPrivacy = [jsonWriter stringWithObject:dictPrivacy];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
message, @"message",
strPrivacy,@"privacy",
nil];