Share image on instagram from cordova app to users profile

333 views Asked by At

I have to share image from my app to instagram. Is there any api or plugin or custom code for that?

1

There are 1 answers

0
Adarsh Srivastava On

There is no official way of doing this but there exists hacks, and one of the hack is used in the library - https://github.com/LevPasha/Instagram-API-python

This is their implementation of photo upload -

from InstagramAPI import InstagramAPI

InstagramAPI = InstagramAPI("login", "password")
InstagramAPI.login()  # login

photo_path = '/path/to/photo.jpg'
caption = "Sample photo"
InstagramAPI.uploadPhoto(photo_path, caption=caption)

You need to make sure not to overuse this, as it might lead to suspension of your instagram account.