[英]Post Message on Friends Facebook Wall post
I am working on Application in which i have to post Greeting to my friends Wall post through My Account. 我正在开发必须通过“我的帐户”向我的朋友留言墙张贴问候的应用程序。
So How can i Perform it ? 那么我该如何执行呢? If anyone have idea Please help me.
如果有人有想法请帮助我。
Thanks in Advance. 提前致谢。
try this 尝试这个
NSMutableDictionary *parmaDic = [NSMutableDictionary dictionaryWithCapacity:4];
[parmaDic setObject:[NSString stringWithFormat:@"hello world"] forKey:@"message"]; // if you want send message
[parmaDic setObject:@"http://icon.png" forKey:@"picture"]; // if you want send picture
[parmaDic setObject:@"Create post" forKey:@"name"]; // if you want send name
[parmaDic setObject:@"Write description." forKey:@"description"]; // if you want description
[_facebook requestWithGraphPath:[NSString stringWithFormat:@"/%@/feed",facebook_user_id]
andParams:parmaDic
andHttpMethod:@"POST"
andDelegate:self];
I use key like.message,picture ..etc please see http://developers.facebook.com/docs/reference/api/post/ 我使用密钥,例如message,picture ..etc,请参阅http://developers.facebook.com/docs/reference/api/post/
Take Dictionary first in which add your data which you want to post on your friends's Wall as:- 首先选择字典,在其中添加要发布到朋友的墙上的数据,方法是:-
NSMutableDictionary *postVariablesDictionary = [[NSMutableDictionary alloc] init];
//posting the text written in the textView
[postVariablesDictionary setObject:self.TextView.text forKey:@"message"];
[objDelegate.facebook requestWithGraphPath:[NSString stringWithFormat:@"%@/feed",friendId] andParams:postVariablesDictionary andHttpMethod:@"POST" andDelegate:nil];
Thats how the data would be posted on friend's wall. 那就是如何将数据发布在朋友的墙上。 Hope it helps Thanks :)
希望对您有所帮助:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.