通过 UIActivityViewController 共享的 Gif 在(至少)fb、twitter、notes 中显示为静态图像

Gif shared through UIActivityViewController comes out as static image in (at least) fb, twitter, notes

我正在尝试通过标准 iOS 共享屏幕将我的 (unity) 应用程序中的 gif 分享到社交网络。

因为 this question 我首先将 gif 的路径包装在 NSURL 中,然后再将其发送到 UIActivityViewController:

NSURL *nsGifURL = [NSURL fileURLWithPath:nsGifPath];
NSArray *itemsToShare = @[nsMessage, nsGifURL];

// find the unity window:
UIWindow *window = [UIApplication sharedApplication].keyWindow;
UIActivityViewController *share = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare applicationActivities:nil];
[window.rootViewController presentViewController:share animated:YES completion:nil];

这一切都编译和运行没有错误,但是当我到达另一个应用程序时,图像是静态的而不是 gif。

如何让 fb 之类的应用在另一端接受并显示 gif?

编辑:nsGifPath 肯定有 .gif 扩展名

作为回答你必须考虑社交网络的分离方式

TWITTER : For share a GIF on twitter had to use twitter API and create a multipart request to achieve the goal and its working very well.

FACEBOOK : I did share some GIF on Facebook using FACEBOOKSHAREKIT , but i don't know why sometimes Gifs are animated, sometimes not.

INSTAGRAM : To share gif on Instagram had to convert GIFS to MP4 (or any other video formats accepted by Instagram) then save it into camera roll then share it , It is little twisted but its working very well.

WHATSAPP : It not supporting GIF at all.

To do all of this i couldn't use "UIActivityViewController" , so decided to create a custom share page. if anybody know something to add here , to help me and others please tell me (especially about Facebook). Thanks in advance