I am working on an application on facebook integration using fbgraph api.I have downloaded sample application from this link oAuth2Test and then changed client_id.While post on me it is working fine but I don't know how to post on a friends wall or if this is possible.
Or at least to send his friends a message.
Can anyone give me a clue?
Thank you!
posting me working fine
-(IBAction)postMeFeedButtonPressed:(id)sender {
NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:4];
[variables setObject:@"this is a test message: postMeFeedButtonPressed" forKey:@"message"];
[variables setObject:@"http://bit.ly/bFTnqd" forKey:@"link"];
[variables setObject:@"This is the bolded copy next to the image" forKey:@"name"];
[variables setObject:@"This is the plain text copy next to the image. All work and no play makes Jack a dull boy." forKey:@"description"];
FbGraphResponse *fb_graph_response = [fbGraph doGraphPost:@"me/feed" withPostVars:variables];
NSLog(@"postMeFeedButtonPressed: %@", fb_graph_response.htmlResponse);
//parse our json
SBJSON *parser = [[SBJSON alloc] init];
NSDictionary *facebook_response = [parser objectWithString:fb_graph_response.htmlResponse error:nil];
[parser release];
//let's save the 'id' Facebook gives us so we can delete it if the user presses the 'delete /me/feed button'
self.feedPostId = (NSString *)[facebook_response objectForKey:@"id"];
NSLog(@"feedPostId, %@", feedPostId);
NSLog(@"Now log into Facebook and look at your profile...");
}