Use UIActivityItemProvider and extend - (id) element {} for Facebook:
Just upload the GIF to Giphy and then specify the Giphy URL in the UIActivityViewController instead of the file content, Facebook will recognize it and display an animated GIF
- (id)item { if ([self.activityType isEqualToString:UIActivityTypePostToFacebook]) {
the full code is in my github , i'm actually ios newb, so some experts, please correct me and the code if possible
source share