I am new to this Instagram API, and I read their doc about endpoints, this is the endpoint that I am using:
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.
hashtag you mean
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 for m in media: print (m.images) print (m.user) print (m.tags)
You can try it and it is working for me.
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.