I have successfully used photos开发者_运维技巧.upload api to upload local images to the users album.
How to upload local images with formatted links? The photos.upload
does support adding the caption text, but I can't embed html-links to the caption. Is there a way to do this using perhaps the Graph-api?
I'm not sure about the caption itself, but here is a way to post the image along with a message to the user's wall. The message text can have imbedded links in it with no problem.
Facebook* fb = [(AppDelegate *) [[UIApplication sharedApplication] delegate] facebook];
NSData* imageData = UIImageJPEGRepresentation([UIImage imageNamed: @"A.jpg"], 90);
NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys: [fb accessToken],
@"access_token",
@"some message here...with a link http://www.google.com",
@"message",
imageData,
@"source",
nil];
[fb requestWithGraphPath: @"me/photos"
andParams: params
andHttpMethod: @"POST"
andDelegate: self];
精彩评论