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/
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 :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.