开发者

Publish on wall (status, link, video etc) with security

I am using facebook-ios-sdk. I want to publish on FaceBook wall with security (status, 开发者_开发知识库link, video, whatever else), so that only specific friends can see the update.

How can I do that?


Check the privacy arguments in this link http://developers.facebook.com/docs/reference/api/post/

and code is like this. this code is just for status update

NSDictionary *privacyDict = [[NSDictionary alloc] initWithObjectsAndKeys:
                   @"SELF",@"value",
                   nil];
SBJSON *jsonWriter = [[SBJSON new] autorelease];
NSString *privacyJSONStr = [jsonWriter stringWithObject:privacyDict];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                   @"my message", @"message",
                   privacyJSONStr, @"privacy",
                   nil];

Set the objectofkey (value,friends,networks,allow,deny) of dictionary privacyDict according to your use

NSDictionary *privacyDict = [[NSDictionary alloc] initWithObjectsAndKeys:
                   @"CUSTOM",@"value",
                   @"SOME_FRIENDS",@"friends",
                   @"[comma separated friends id]",@"allow",
                   nil];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜