gpt4 book ai didi

ios - Facebook iOS SDK 从 App 分享图片

转载 作者:行者123 更新时间:2023-11-28 22:38:06 25 4
gpt4 key购买 nike

我尝试将图片分享到 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]: unrecognized selector sent to instance 0xc98b1d0

我做错了什么?非常感谢

最佳答案

尝试使用“来源”而不是“图片”。图片需要 url 字符串。

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

关于ios - Facebook iOS SDK 从 App 分享图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15371469/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com