iOS FBSDKShareLinkContent Share Post - imageURL不加载移动数据。

时间:2022-09-03 23:31:56

I am sharing a Facebook post using FBSDKShareKit framework using FBSDKShareLinkContent. I am setting the content's imageURL to load an image for the post to be shared. The problem is, when I am sharing the post while on a mobile internet/3G connection, the link's image is not loading and shared on the post. Meanwhile, it is working fine when sharing the link while on a Wifi connection. To further illustrate, please refer to the screenshot below:

我正在使用FBSDKShareLinkContent使用FBSDKShareKit框架共享一个Facebook帖子。我正在设置内容的imageURL以加载要共享的post的图像。问题是,当我在移动互联网/3G连接上分享帖子的时候,链接的图片没有被加载和分享到帖子上。与此同时,在Wifi连接上共享链接时,它运行良好。如需进一步说明,请参阅以下截屏:

Screenshot: http://i.imgur.com/S2Z4Ddi.png?1

截图:http://i.imgur.com/S2Z4Ddi.png?1

My apologies as I can't post images yet due to my reputation.

我很抱歉,由于我的名声,我还不能发布图片。

I am using the following code to make and share the content.

我正在使用以下代码制作和共享内容。

let content:FBSDKShareLinkContent = FBSDKShareLinkContent()
content.contentURL = NSURL(string: linkURL)
content.contentTitle = nsTitle as! String
content.contentDescription = nsDesc as! String
content.imageURL = NSURL(string: imageURL)

let button:FBSDKShareButton = FBSDKShareButton()
button.frame = CGRectMake(0, 0, 0, 0)
button.shareContent = content
button.sendActionsForControlEvents(UIControlEvents.TouchUpInside)

Any ideas?

什么好主意吗?

Thanks in advance.

提前谢谢。

1 个解决方案

#1


1  

Tested with other devices, could just potentially be a factory defect on the iPhone6's 3G.

用其他设备进行测试,可能只是iPhone6 3G上的一个工厂缺陷。

The testing is done by using 2 different SIM Cards on the same phone, same result. Meanwhile both SIM Cards are also tested on another device, different result. Speedtest is also done to check. both of which are comparable in speed.

测试是通过在同一部手机上使用两种不同的SIM卡完成的,结果相同。同时,两款SIM卡也在另一个设备上进行测试,结果不同。速度测试也是为了检查。两者在速度上都相当。

#1


1  

Tested with other devices, could just potentially be a factory defect on the iPhone6's 3G.

用其他设备进行测试,可能只是iPhone6 3G上的一个工厂缺陷。

The testing is done by using 2 different SIM Cards on the same phone, same result. Meanwhile both SIM Cards are also tested on another device, different result. Speedtest is also done to check. both of which are comparable in speed.

测试是通过在同一部手机上使用两种不同的SIM卡完成的,结果相同。同时,两款SIM卡也在另一个设备上进行测试,结果不同。速度测试也是为了检查。两者在速度上都相当。