Reputation: 2173
i followed the instructions on Instagram-Developers-Site step-by-step and managed to subscribe to a hashtag. Now, when my node.js server is up and running i promt req.body
to see what i am getting. These are the POST-Requests Instagram is sending me:
[ { changed_aspect: 'media',
subscription_id: 2844823,
object: 'tag',
object_id: 'food',
time: 1359561407 } ]
This is also as described in the guideline, my question now is: What can i do with it? I mean i expected a JSON-Object containing all necessary data to display a photo on my page. Parameters for example would be: Name, PicURL, Comments, Location, but all i get is this above. So can you tell me in which way this information I am receiving is usefull?
So a short summary: - I want to display photos of a certain tag on my page - using Node and Express - PubSub is working - I receive that there is a new picture postet but where do i get information about that particular picture?
Upvotes: 3
Views: 4272
Reputation: 9044
You can check this Instagram Real-time API Demo App to get inspiration: https://github.com/Instagram/Realtime-Demo
Upvotes: 1
Reputation: 11
This JSON is only a notification that there is a new photo. Then you have to do a request with the instagram api for get the last photo.
api.instagram.com/v1/tags/[your tag]/media/recent?count=1&.....
Upvotes: 1