2

I want to share app store link of app, image and text on instagram Is it not possible to show pre filled text on instagram? Is it possible to share link on instagram though iOS app. Below is my swift code please suggest me. Image share successful, how to share link of app?

         let image = UIImage(named: "flag_image")
          let documentsURL = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)[0]

         let destinationPath = documentsURL.URLByAppendingPathComponent("filename.igo")

         if let pngImageData = UIImagePNGRepresentation(image!) {
            pngImageData.writeToURL(destinationPath, atomically: false)
        }

         print(destinationPath.path!)
         self.doc = UIDocumentInteractionController()
         self.doc!.annotation = NSDictionary(object: "my caption", forKey: "InstagramCaption")
          self.doc!.URL = NSURL(fileURLWithPath: destinationPath.path!)
         self.doc!.UTI = "com.instagram.exclusivegram"
         self.doc!.presentOpenInMenuFromRect(CGRectZero, inView: self.view, animated: true) 
Moin Shirazi
  • 4,372
  • 2
  • 26
  • 38
Nazish Ali
  • 320
  • 3
  • 16
  • Was searching for this too but it seems from this link: http://developers.instagram.com/post/125972775561/removing-pre-filled-captions-from-mobile-sharing that it is not supported anymore by instagram – giorashc Aug 21 '16 at 10:41

0 Answers0