繁体   English   中英

Facebook iOS SDK分享来自App的图片

[英]Facebook iOS SDK share picture from App

我尝试分享图片到Facebook。 这是工作。

 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];

但我想从我的应用程序分享图片。 我试试

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   kAppId, @"app_id",
                                   url, @"link",
                                  [UIImage imageNamed:@"nav.png"], @"picture",
                                   title, @"name",
                                   produc, @"caption",
                                   tempString, @"description",
                                   message, @"message",
                                   nil];

但我有问题:

:frame:decisionListener:delegate: - [UIImage length]:发送到实例0xc98b1d0的无法识别的选择器

我究竟做错了什么? 非常感谢你

尝试使用“来源”而不是“图片”。 图片期待网址字符串。

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   kAppId, @"app_id",
                                   url, @"link",
                                  [UIImage imageNamed:@"nav.png"], @"source",
                                   title, @"name",
                                   produc, @"caption",
                                   tempString, @"description",
                                   message, @"message",
                                   nil];

嗯,我不是用户Facebook会解码你的位图图像,将图像保存在他们的服务器上,并让它在你的墙上可用^^

尝试使用URL而不是图像的NSData数据。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM