This question has frequently been asked over stackoverflow.com but none of the answers work for me. What i need to do is to post on the wall of user’s friend from within my app. I have included stream_publish to the list of permissions so it must work but it doesn’t.
What i have already tried is:
NSMutableDictionary* params = [NSMutableDictionary dictionary];
[params setObject:@"Some text" forKey:@"user_message_prompt"];
[params setObject:@"another text" forKey:@"action_links"];
[params setObject:@"Yet another text" forKey:@"attachment"];
[params setObject:@"1234567890" forKey:@"target_id"];
[facebook dialog: @"stream.publish"
andParams: params
andDelegate: self];
but when the dialog window pops up it tell me “An error occured with MyAppName. Please try again later.”
Also i tried
[facebook requestWithGraphPath:@"[1234567890]/feed"
andParams:[NSMutableDictionary dictionaryWithObject:@"test wall post" forKey:@"message"]
andHttpMethod:@"POST"
andDelegate:self];
but it just does nothing. What am i doing wrong? Can anyone correct me?
This is how i solved it. The problem was incorrect parameters for action links.