问题
I have upload images with url image successful on this way
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"https://developers.facebook.com/docs/reference/dialogs/", @"link",
@"http://fbrell.com/f8.jpg", @"picture",
@"Facebook Dialogs", @"name",
@"Reference Documentation", @"caption",
@"Using Dialogs to interact with users.", @"description",
nil];
AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[[delegate facebook] dialog:@"feed"
andParams:params
andDelegate:self];
Now i want to upload image from a local image in same way
like
profImg = [UIImage imageNamed:LoginWithFacebookNormal@2x.png"];
NSData *data = [NSData dataWithData:UIImagePNGRepresentation(profImg)];
i have used data, @"picture", in dictionary but it's give me error
is it any other way to upload local/Gallery/resource image with dialog box + comment area ?
I have searched but every time found that only url image can feed the dialog box
I have used Hackgraph tutorial for this posting.
Note: I am not using Sharekit or any other API i have used only Graph API
回答1:
Finally after lots of research I get the example of Facebook. Download the example from here. You have to make modification because currently example hold static image.
来源:https://stackoverflow.com/questions/10995184/how-to-post-local-image-with-dialog-text-in-facebook