How to get an Instagram Access Token

Link to oficial API documentation is http://instagram.com/developer/authentication/ Longstory short – two steps: Get CODE Open https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code with information from http://instagram.com/developer/clients/manage/ Get access token curl \-F ‘client_id=CLIENT-ID’ \ -F ‘client_secret=CLIENT-SECRET’ \ -F ‘grant_type=authorization_code’ \ -F ‘redirect_uri=YOUR-REDIRECT-URI’ \ -F ‘code=CODE’ \ https://api.instagram.com/oauth/access_token

How to share an image on Instagram in iOS?

Finally I got the answer. you can not directly post an image on instagram. You have to rediredt your image with UIDocumentInteractionController. @property (nonatomic, retain) UIDocumentInteractionController *dic; CGRect rect = CGRectMake(0 ,0 , 0, 0); UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, self.view.opaque, 0.0); [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIGraphicsEndImageContext(); NSString *jpgPath = [NSHomeDirectory() stringByAppendingPathComponent:@”Documents/test.igo”]; NSURL *igImageHookFile = [[NSURL alloc] initWithString:[[NSString alloc] initWithFormat:@”file://%@”, jpgPath]]; … Read more

Instagram API – How can I retrieve the list of people a user is following on Instagram

Shiva’s answer doesn’t apply anymore. The API call “/users/{user-id}/follows” is not supported by Instagram for some time (it was disabled in 2016). For a while you were able to get only your own followers/followings with “/users/self/follows” endpoint, but Instagram disabled that feature in April 2018 (with the Cambridge Analytica issue). You can read about it … Read more

How to post pictures to instagram using API

Update: Instagram are now banning accounts and removing the images based on this method. Please use with caution. It seems that everyone who has answered this question with something along the lines of it can’t be done is somewhat correct. Officially, you cannot post a photo to Instagram with their API. However, if you reverse … Read more

Instagram how to get my user id from username?

Update in Jun-5-2022, Instagram API no longer use Bearer Token for authentication. But I find another useful API. All you need is added extra header X-IG-App-ID with “magic value”. https://i.instagram.com/api/v1/users/web_profile_info/?username=therock Use can use my docker container Insta-Proxy-Server to bypass the authentication. https://hub.docker.com/repository/docker/dockerer123456/insta-proxy-server Demo video (I just run directly from source code): https://www.youtube.com/watch?v=frHC1jOfK1k Update in Mar-19-2022, … Read more

How can I get a user’s media from Instagram without authenticating as a user?

var name = “smena8m”; $.get(“https://images”+~~(Math.random()*3333)+”-focus-opensocial.googleusercontent.com/gadgets/proxy?container=none&url=https://www.instagram.com/” + name + “https://stackoverflow.com/”, function(html) { if (html) { var regex = /_sharedData = ({.*);<\/script>/m, json = JSON.parse(regex.exec(html)[1]), edges = json.entry_data.ProfilePage[0].graphql.user.edge_owner_to_timeline_media.edges; $.each(edges, function(n, edge) { var node = edge.node; $(‘body’).append( $(‘<a/>’, { href: ‘https://instagr.am/p/’+node.shortcode, target: ‘_blank’ }).css({ backgroundImage: ‘url(‘ + node.thumbnail_src + ‘)’ })); }); } }); html, body { … Read more

tech