How Does Instagram’s GET/tags//media/recent Pagination Actually Work?

To get the newest set of grams for a particular tag, use this: https://api.instagram.com/v1/tags/latergram/media/recent?access_token=TOKEN From that response, you can get newer grams from the same tag by taking the min_tag_id from the response (under pagination) and build a url like so: https://api.instagram.com/v1/tags/latergram/media/recent?access_token=TOKEN&min_tag_id=1387332980547 Or you can get the next (older) set of grams by using the … 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

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

Instagram ?__a=1 url not working anymore & problems with graphql/query to get data

The query_hash does not change, at least in the past few days. It indicate what TYPE of query it is. Below listed 4 query types I knew, hope these help. Load more media under https://www.instagram.com/someone/?__a=1 https://www.instagram.com/graphql/query/?query_hash=472f257a40c653c64c666ce877d59d2b&variables={“id”:”93024″,”first”:12,”after”:”XXXXXXXX”} (Instagram blocked the above access since 2018-04-12. You have to remove the __a=1 and extract the JSON inside a … Read more

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

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