0

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

Alexander
  • 627
  • 2
  • 11
  • 23

2 Answers2

1

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];
Edwin Iskandar
  • 4,119
  • 1
  • 23
  • 24
1

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.

Thomas Decaux
  • 21,738
  • 2
  • 113
  • 124