Note that there are some explanatory texts on larger screens.

plurals
  1. POInstagram realtime API does not return content IDs?
    text
    copied!<p><strong>Current scenario</strong></p> <p>I have build an application that harvest Instagram images from a specific hashtag. I use the pagination to fetch all images, and store the data (not the images) locally in a database. The first invocation of the app harvest all images. Subsequent invocations only harvest those newer than the newest image in the local database. Otherwise I would need to make thousands of request to page through all images on popular tags. And that would need to be done every few minutes, if images where to appear without too much delay in the app. The problem that arises is that when users put tags on old images, these images are then not fetched by my app - because of the only-fetch-new-images performance construct.</p> <p><strong>Attempt at solution</strong></p> <p>I looked at the realtime API, but is seems to me it is constructed in a way that makes it unsuable. This is what it sends in a realtime update for a tag:</p> <pre><code>{ "subscription_id": "2", "object": "tag", "object_id": "nofilter", "changed_aspect": "media", "time": 1297286541 } </code></pre> <p>I would have thought that there would be a list of media IDs, representing the new/changed content, from which I could fetch the actual content - but there is not. My current solution is to fetch new content every few minutes, and then doing full rescans every hour. This is suboptimal both from a user, and a performance perspective.</p> <p><strong>Question</strong></p> <p>Is it really not possible to do in a more elegant way? I appreciate that Instagram does not send the full content in the realtime update, but sending the IDs should not be a problem in terms of payload-size. It seems like the API is pretty useless in this regards - the only use-case I can think of, where it would be of any use, is for a "There is new content on you hashtag watch" nofications.</p> <p>Best, Torben</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload