To βlikeβ a photo (or still with an identifier), simply place your token token in the Graph API, for example. your photo has ID 123456789. Therefore, you must publish your access token at https://graph.facebook.com/123456789/likes .
To comment on a photo, do the same, but post the message (as a parameter) in the Graph API, for example. https://graph.facebook.com/123456789/comments .
In a code call, the following method (defined on Facebook.h) with your path and no parameters for βLikeβ and a message as a parameter for βCommentβ:
-(void) requestWithGraphPath:(NSString *)graphPath andParams:(NSMutableDictionary *)params andHttpMethod:(NSString *)httpMethod andDelegate:(id <FBRequestDelegate>)delegate
Please note that httpMethod must be "POST" and the iOS SDK file automatically adds your access token.
For more information, read the "Publishing" section at: http://developers.facebook.com/docs/reference/api
Edit: Like deanWombourne wrote in the comments: Just post an NSMutableDictionary like this
[NSMutableDictionary dictionaryWithObjectsAndKeys:@"This is my comment", @"message", nil];
for comments or an empty NSMutableDictionary, for example:
[NSMutableDictionary dictionary]
if you want to like the message.
The response from the Facebook servers should be result = true.
audience
source share