(这个真的和这个问题一样,只是给出的答案不相关
add image and description on facebook with sharekit )
如何使用 ShareKit 发送图像链接,以便在共享时显示如下:
或者,我能否将 FB 应用程序设置为在发布内容时始终显示大图标?
最佳答案
(回答我的问题)
我更改了文件 SHKfacebook.m,将 dialog.attachment 行更改为:
dialog.attachment = [NSString stringWithFormat:@"{\"name\":\"%@\",\"href\"
:\"%@\",\"media\":[{\"type\":\"image\",\"src\":\"http://example.com/example.png\"
,\"href\": \"http://example.com/\"}]} ",item.title == nil ? SHKEncodeURL(item.URL)
SHKEncode(item.title),SHKEncodeURL(item.URL)];
(粘贴后一行)
你可以看到有一个图片 url - http://example.com/example.png - 这应该是大约 76 X 90 像素,和一个链接 url - http://example.com/
您可能还需要明确设置共享类型。我注意到在 3G/3GS iPhone 上它不起作用,除非你这样做:
item.shareType = SHKShareTypeURL;
[SHKFacebook shareItem:item];
关于iphone - ShareKit - 将链接图像发布到 facebook 墙上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7122414/