Getting live followers

ok, this is my first post here so don’t eat me…

I’m working on my own followers allert with use of nodejs + mysql + socket.io + request

Now I’m getting last followers with api file https://api.twitch.tv/kraken/channels/Channel_Name/follows?limit=100 but it is refreshing every +/-30 sek so it’s not live but semi live it sends in chunks, how can I rework my code ( pastebin bellow ) or what I have to use to get live followers ( someone follows I get automatic information )

http://pastebin.com/AD2Grh4X

The Twitch API guidelines states that you should avoid hitting the API (any end point) more than once per minute.

You basically cannot get “live” followers, you can only get data that is up to 59 seconds old.

Most follow notifiers appear to be “live” as they get the differences and then spread those differences over the next minute instead.

So in summary, there is nothing to fix, as you can’t get the data any quicker than you are already trying to

Is there a specific use case for this really? Do your users really need a live update of the follower count?

There is an API limitation anyway as @BarryCarlyon mentioned, but I’m just curious.

it’s more like a technical question, I saw that alert from twitchalerts ( tested it with few of my friends ) is reacting with auto response on follow with like 1-4 sek delay, so I tried to make my own, and this question was born because I could not find a way to do it

That was luck.

Due to API caching there will always be up to a minute delay.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.