Possible Duplicate:
Facebook API: Post on friend wall
I’m trying to post the message on a friends wall. But it doesn’t work with my below code,
NSMutableDictionary* params = [NSMutableDictionary dictionary];
[params setObject:@"Some text" forKey:@"user_message_prompt"];
[params setObject:@"another text" forKey:@"action_links"];
[facebook requestWithGraphPath:@"****FB ID here *****/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];
I tried many ways to figure it out, but couldn’t find the solution. Please let me know what I did wrong in my code. I need a quick help to resolve.
This is how I push messages to a friends Facebook wall:
In your .h file:
In your .m file:
In
viewDidLoad:One thing has to be clear. You can only post to a friends wall when he is really in your friendlist, otherwise it will not work. I tested the code on my profile and it works!