How can I get all my instagram account feed? - api

I'm trying to get all my instagram account feeds/images. But I found that the api has restriction for 20 feeds only. I can only get my latest 20 posts. But I want all my posts/feeds. I guess there is some way to do that cause I found some examples that is displaying all the feeds.
Any suggestions can be helpful. Thank you in adcance.

If you just signed up for API, you will be in Sandbox mode which has limitations
The behavior of the API when you are in sandbox mode is the same as
when your app is live, but comes with the following restrictions:
Data is restricted to sandbox users and the 20 most recent media from each sandbox user
Reduced API rate limits
more info here: https://www.instagram.com/developer/sandbox/

Use have to submit request to instagram. Example for your case you can submit basic permission to read a user’s profile info and media. Step by step:
1. Create new client at https://www.instagram.com/developer/
2. Make video screencast of your app to tell how you use the permission
3. Go to manage tab -> permission tab and submit to instagram approval

Related

Sign Up and get Follow List With Instagram Still Allowed?

In my project I want to implement a sign up with Instagram and a get user's follow list feature. However, on the Instagram developer website under login permission it says under public content and follower list that "applications no longer accepted". Does this mean that I can no longer implement these features?
For security reasons, a lot of Instagram API access was removed in 2016. You can read more about it here: http://uk.businessinsider.com/instagram-made-a-change-that-stopped-lots-of-third-party-apps-from-working-2016-6/?IR=T. This was to increase customer privacy.

Get all media use instagram api in sandbox

I have a app use instagram api. In sandbox I want to all media but I get only 20 media. first, I call api
https://api.instagram.com/v1/users/{user-id}/media/recent/?access_token={access-token}
I get the first 20 medias. Next, max_id will be id of the last record. But result return empty.
my code
https://api.instagram.com/v1/users/{user-id}/media/recent/?access_token={access-token}&max_id={max-id}
Its sandbox limit:
To help you develop and test your app, the users and media available
in Sandbox mode are real Instagram data (i.e. what is normally visible
in the Instagram app), but with the following conditions:
Apps in sandbox are restricted to 10 users
Data is restricted to the 10 users and the 20 most recent media from each of those users
Reduced API rate limits
https://www.instagram.com/developer/sandbox/
You can get the next set by using the next_url parameter from the original response like this.
if (r.pagination.next_max_id){
$('.instagram').attr('data-instagramnext', r.pagination.next_max_id);
}
You can also check this comment for getting more information.

Instagram API, get more than 20 pictures from my OWN account

Sandbox mode is now limited to 20 media calls. So when attempting to submit the app for review, choosing the option of
I want to display my Instagram posts on my website
prompts this response:
You do not need to submit for review for this use case. If you are a developer and you want to display Instagram content on your website, then you do not need to submit your app for review. By using a client in sandbox mode, you can still access the last 20 media of any sandbox user that grants you permission.
So it would appear that my Instagram Client is now trapped at only 20 media calls at a time, and we can't seem to find a solution.
Anyone was able to get more than the last 20 pictures? Is instagram Api really this shit? Cant believe this
btw: theres alot of questions about this here, buts they are all outdated, since they changed their politics in 2016, im looking for a working solution.
Thanks in advance!

Get historical data using Instagram API endpoints.

I am trying to fetch data using the Instagram API endpoints. Steps that I have followed
1. Register the client app.
2. Got the access token.
3. I am using this access token through out the url endpoints.
Ex. to get the data for recent media I am using this url endpoint: https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN
However as I am in Sandbox mode, as per the documentation I get only the recent 20 media. Whereas my account contains in total 291 media.
Problems that I am facing:
Not able to get next_url in the paginationpart.
Usage of min_id and max_id in the url does not respond to any changes in the output or the data i.e fetched (Still get only 20 records/media)
Ex: https://api.instagram.com/v1/users/self/media/recent?access_token=XXXXXX&min_id=xxxxxx_xxxxx&max_id=xxxxxxx_xxxxxxx
Can anybody provide a solution as to how exactly I should get all of my historical data ?
You're in the sandbox mode so there's no way to achieve what you're trying to do before your app has been reviewed and approved (and gone live). From Instagram API documentation:
After your app has been reviewed and approved, you are ready to make it available to the general public. To switch your client from sandbox to live mode, you can use the button on the top section of the configuration screen for your app. When you are live, any Instagram user will be able to authorize your app, but you will have access only to the permissions that you were granted during the review.
Well, maybe you should try this library that allows you to scrape public info withou auth (client_id or access_token): https://github.com/raiym/instagram-php-scraper
$medias = Instagram::getMedias('kevin', 150);

Instagram api - get all photos by hashtag

I am new to this Instagram API, and I read their doc about endpoints, this is the endpoint that I am using:
/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN
It is fetching the images, but, only on my accounts photos. I want is, I will give an tag-name, and it wll display all, not just the photos on my account, but all the photos in Instagram too.
I know has been a long time, but just for the record.
Since you need the public_scope permission for this (the permission that gives you access to all public data on instagram, and not only your account) you need your app to be reviewed and approved by Instagram. However, if you're using the API for a one-site personal project, Instagram will not approve it.
Here's from Instagram's docs:
1: Which use case best describes your Instagram integration?
R: I want to display hashtag content and public content on my website.
A: This use case is not supported. We do not approve the
public_content permission for one-off projects such as displaying
hashtag based content on your website. As alternative solution, you
can show your own Instagram content, or find a company that offers
this type of service (content discover, moderation, and display).
You can find more information in the Permission Review documentation.
Your client is in Sandbox Mode and can only search for tags of photos posted by invited users. You have to login into https://www.instagram.com/developer, edit your client and click on the "GO LIVE" button.
If the "GO LIVE" button is disabled, you have get your app reviewed by Instagram first: Click on the Permissions tab and submit for review. (Company Name, Contact Email and Privacy Policy URL are required to start a submission.) Once approved, u will be able to click Go Live.
By hashtag you mean tags.
It works for me. Despite I'm using python client, it should work well when you're developing your own client. Look:
from instagram.client import InstagramAPI
api =InstagramAPI(client_secret=settings.CLIENT_SECRET,
access_token=settings.ACCESS_TOKEN)
result = api.tag_recent_media(tag_name='castle')
media = result[0]
for m in media:
print (m.images)
print (m.user)
print (m.tags)
You can try it and it is working for me.
/v1/tags/{tag-name}/media/recent?client_id={YOUR_CLIENT_ID}
My client id is created before "permission review", it is working now and I am trying to submit permission review to Instagram now, hope it will pass.