Is it possible to get the Instagram news feed through the API? - instagram

When you open the Instagram APP you can look at your news feed where you can see that someone is now following you, likes or has commented on a certain photo.
When I look at the Instagram API (http://instagram.com/developer/) I can retrieve likes and comments when I request a certain media ID. However in order to know if someone has commented on a photo of mine I would need to scan all the photo's and request it's comments to check if any new comments have been made.
Does anyone know of a better way? Help is appreciated.

If it helps, content for "Following" tab is available at http://instagram.com/api/v1/news/, and "News" tab at http://instagram.com/api/v1/news/inbox/ (you need to be logged in to your account).
All URLs point to internal instagram:// protocol so you would need to replace them when parsing and there seem to be no pagination options.

Related

Instagram API Possible Solution

I have one question, with an Instagram Username. Can I get back data from that user? for example, get photos and number of followers? (only if profile is public)
I'm creating a website were users can upload their Instagram username #example and based on that scrap and create a profile on the website with their latest photos and the number of followers (all of this without logging).
I think This image will help to understand what I'm trying to achieve, Can someone guide me? this is possible with Instagram API?
Yes this was possible recently with https://www.instagram.com/<username>/?__a=1 but instagram recently blocked this possibility.
I'll update my post if I find a new method.

Instagram /tag/search looks like getting results out of sandbox for me, how come

All endpoints like for hashtag, work in sandbox and get info in json from within sandbox users in public_content scope with users info.
Yet "https://api.instagram.com/v1/tags/search?q=cat&access_token=..." brings me result apparantly out of sandbox, results I have not seen before, and only with items include "data: name, media_count", without user info.
Question 1, is it really getting out of sandbox, is it a bug?
Question2, why not user info then, cause I can use more info, Image URL for example, why not? am I missing something?
Thanks :)
https://api.instagram.com/v1/tags/search?q=snowy&access_token=ACCESS-TOKEN
This endpoint only gives you similar hashtag name and count for the search term.
Documentation here: https://www.instagram.com/developer/endpoints/tags/#get_tags_search
If you want all photos and user details for a hashtag then use this API:
https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN

Wants to save Instagram post and comments on post to our domain, is it possible and if possible how?

I have a domain which have a feature to login with instagram a/c, registered users associate their instagram a/c using this process.
Now i want to store/save all post and comments of users they have posted on instagram a/c.
So that i can perform a search on comments and caption of posts.
As fas as my knowledge its not possible by using instagram api thats why i am saving info in my database.
Is there any simple way to perform search ?
Any help will be appreciated.
Thanks
Instagram only gives you 150 latest comments via API, so if you want to search through all comments, you have fetch comments at regular interval and save on server, searching these comments are straight forward, look for substring in the comment items saved. It is kind of tricky on deciding how often you want to check for comments and store, usually mosts comments are posted few minutes after a popular photo is posted. If you do the checks too often, you may reach the API rate limit.
https://api.instagram.com/v1/media/{media-id}/comments?access_token=ACCESS-TOKEN
If you are dealing with less than 150 comments on average, then you can search through it without needing to save on server and can be done all on client side. Just pull the comments using API and do search through the array of comments using javascript.
Picodash allows you to view the latest 150 comments and search any keyword or user, here is screenshot:
I have developed library in php: https://github.com/raiym/instagram-php-scraper
It allows you to get ALL comments from specific post (I have tested with 8 000 comments)
$comments = Instagram::getMediaCommentsByCode('BGY0zB4r7X2', 1500);

How to get "public_content" permission in Instagram API?

I have App what use in my website a widget by inwidget.ru : this widget show recent photos by special user or hashtag (people who have red heads and use #redpeopleorg in Instagram will show in my website http://redpeople.org).
After 17'November 2015 Instagram had change rules.
I made a screencast, send submission with description why I need live-mode and tried to get "public_content" permission in Instagram API, but they changed review status to "Declined".
Anybody have positive experience with reviewing applications in Instagram Api?
I don't know devs who had. Bat there's still a hope, e.g. you can parse public search results:
https://www.instagram.com/explore/tags/hashtag/
I use a bunch of javascript code, that contains json string with all posts - just json_decode'd it.

How can I search Instagram with hashtags via a URL?

On both Facebook and Twitter, you can do a simple search of hashtags on these channels via a URL search, for example,
https://www.facebook.com/hashtag/myhashtag
Can you do the same with Instagram also? I can't seem to figure it out. I did find some API, but that's about all: https://instagram.com/developer/endpoints/tags/
This might be something that Instagram implemented after this question was originally asked, but this currently works:
http://instagram.com/explore/tags/yourhashtag
OR
http://instagram.com/tags/yourhashtag
The latter simply redirects to the former, but it's handy to have a shorter URL in some instances.
You'll find out more about how to customise Instagrams URLs by using endpoints on their API documentation page.
I'm not very familiar with how to use URL parameters and I'd be curious to know if anyone has found a way to filter via URL both by user and hashtag. Meaning that you show everything a specific user has posted with a specific hashtag. Many Instagram plugins allow you to do this at the same time, so one would hope it's possible via URL as well.
There is the instagram public API's tags section that can help you do
this. http://instagram.com/developer/endpoints/tags/
http://iconosquare.com/tag/ is another alternative
For example: http://iconosquare.com/tag/flowers
via https://stackoverflow.com/a/11182218/1085891

Resources