I am new to Programing, I’ve programed an iOS app which is almost completed, Now I want to integrate contents(Image, Text and URL) sharing capability to my app, I’ve achieved Facebook and Twitter Sharing functionality, But I am stuck at Instagram sharing functionality since two days.
I’ve studied lots of material(earlier asked question here StackOverFlow, also tried MGInstagram and few other third party API’s) but all of those are outdated & not working on iOS9 & iOS10,
I tried to achieve some help from Instagram site but there too I am not cleared.
Can Anyone Define some easy way to integrate Instagram Sharing button code in my iOS app also to define authentication process from Instagram site clearly like as tokens & other permissions required for developers.
Thanks
2
Answers
This should open instagram on a device and share the photo onto Instagram.
Declare
<UIDocumentInteractionControllerDelegate>
in your ViewController.h fileHope it helps you out.
As per your Desired question for iOS 9 and 10 So I am explaining for both.
I am using Instagram,s Standard Documentation API as defined in iPhone Hooks at Instagram
Step1:
open your info.plist file and add
LSApplicationQueriesSchemes
and add your URL schemes which you are going to call in yourcanOpenURL
like this.It is also defined in WWDC 2015 Session 703 by kitty scatter.
It will open instargram app installed in your device.
note It’ll never work in your simulator because of unavailability of required app.
Step2:
in your .h file where your
@interface
line ends add this<UIDocumentInteractionControllerDelegate>
to the same@interface
lineStep3:
add following code for sharing image in your instagram sharing button’s action
Final Note:
Follow Step one if you are using iOS SDK 9.5 or above like 10. and to remove second line of code mentioned in third step. and in case you are using iOS 9 till 9.2.3 then no needs to do first step, you should follow second line of code of third step.
Hope it’ll work smoothly like water flow. . . 🙂