Share Gif image on facebook on ios

How to share .gif image on facebook from my ios app? I tried the png and jpg format, it works. but when I share the .gif file. it will simply be shared as a normal image, not as an animated image.
so if anyone tried. please help me find solutions.

+1
source share
3 answers

Source : Facebook Animated GIF Guide

If you try to upload GIFs to Facebook, a still image will first appear on the frame. However, there are three ways to try and outsmart systems.

  • Make your Youtube video look like a GIF.

  • Use a third-party application on Facebook, for example, Animated Picture. You are not using your own files for this application. There are hundreds of sorted in different categories to choose from.

  • Send a GIF link. Yes, a still image will be displayed, but a description will accompany it. Yes, it may take longer, but
    your friends will be curious what that means.

But if the GIF you want to upload is not a moving image, it should work just fine. If you have a GIF image that is a still image, you should not have problems uploading to Facebook. According to the Facebook Developers Page, GIFs are one of the many file types that are allowed to be uploaded to the platform. Other supported image file types include JPG, PNG, PSD, TIFF, JP2, IFF, WBMP, and XBM.

PS: This was the first result I got when I thought it over. You will find many other sources for this. For example: Finally, you can add GIFs to Facebook .

+1
source
if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"facebook://app"]]){ NSLog(@"imag %@",_GIFURL); self.documentationInteractionController.delegate = self; self.documentationInteractionController.UTI = @"com.facebook.photo"; self.documentationInteractionController = [self setupControllerWithURL:_GIFURL usingDelegate:self]; [self.documentationInteractionController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES]; } else { UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"facebook not installed." message:@"Your device has no facebook installed." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; } 
+1
source

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]) { // Upload to Giphy ... return [NSURL URLWithString:giphyURL]; } } 

the full code is in my github , i'm actually ios newb, so some experts, please correct me and the code if possible

0
source

All Articles