开发者

Privacy settings when posting to a user walls through iOS app

I have successfully posted a post on my own profile through an iPhone application I am making. However the post is only visible to me, how do I fix the pri开发者_如何学JAVAvacy settings? I have done the following. I don't know if the jsonWriter-part is correct though, I found it in a Video project at Facebook.

NSDictionary *dictPrivacy = [NSDictionary dictionaryWithObjectsAndKeys:@"ALL_FRIENDS", @"value", nil];
SBJSON *jsonWriter = [[SBJSON new] autorelease];
NSString *strPrivacy = [jsonWriter stringWithObject:dictPrivacy];

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   name, @"name",
                                   message, @"message", 
                                   picture, @"picture",
                                   caption, @"caption",
                                   link, @"link",
                                   description, @"description", 
                                   strPrivacy, @"privacy", nil];


You can modify value parameter to these Values EVERYONE, ALL_FRIENDS, NETWORKS_FRIENDS, FRIENDS_OF_FRIENDS.

Hope this would help.

PS : Further details can be find out here http://developers.facebook.com/docs/reference/api/post/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜