Reputation: 637
I try share picture to Facebook. This is work.
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
kAppId, @"app_id",
url, @"link",
@"http://yandex.st/morda-logo/i/logo.png", @"picture",
title, @"name",
produc, @"caption",
tempString, @"description",
message, @"message",
nil];
But I want share picture from my App. I try
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
kAppId, @"app_id",
url, @"link",
[UIImage imageNamed:@"nav.png"], @"picture",
title, @"name",
produc, @"caption",
tempString, @"description",
message, @"message",
nil];
But I have problem:
:frame:decisionListener: delegate: -[UIImage length]: unrecognized selector sent to instance 0xc98b1d0
What am I doing wrong? Thank you very much
Upvotes: 0
Views: 6414
Reputation: 22681
Hmm I am not user Facebook gonna decode your bitmap image, save the image on their server and make it available on your wall ^^
Try an URL instead of the NSData data of your image.
Upvotes: 1
Reputation: 4119
Try using "source" and not "picture". Picture is expecting the url string.
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
kAppId, @"app_id",
url, @"link",
[UIImage imageNamed:@"nav.png"], @"source",
title, @"name",
produc, @"caption",
tempString, @"description",
message, @"message",
nil];
Upvotes: 1