Reputation: 238
I am following this link Instagram Real time updates tag - getting empty data, why? to implement Instagram Real Time Subscription.
I am thinking do I need to hit the url every time in order to check the new update, how is gonna work?. Some are using nodejs, socketio,etc, which I dont want to get into this.
What I am trying to achieve through this that every time is a new update, It starts getting analytic automatically without letting my system know which image to mointor.(I already implemented this part), but stuck on the real time.
Any suggestion to that.
Upvotes: 0
Views: 2788
Reputation: 7045
You don't need socketio. https://instagram.com/developer/realtime/?hl=en
The point of subscription: You create a subscription (you'll give some parameters, client_id, client_secret and the url you want instagram to call when there is an update, check the documentation for details).
curl -F 'client_id=CLIENT-ID' \
-F 'client_secret=CLIENT-SECRET' \
-F 'object=user' \
-F 'aspect=media' \
-F 'verify_token=myVerifyToken' \
-F 'callback_url=http://YOUR-CALLBACK/URL' \
https://api.instagram.com/v1/subscriptions/
Each time the media you subscribed to is updated instagram will send you new data to the urlcallback you provided in the subscription.
I hope it helps you to understand how it works. Read the documentation throghroughly.
you NEED to read the documentation =D From the documentation:
"When someone posts a new photo and it triggers an update of one of your subscriptions, we make a POST request to the callback URL that you defined in the subscription".
Upvotes: 2