Api: follower number

hello . Is there a way to get the number of followers of a streamer? I want show them on my website with php .

You can find the docs here: https://github.com/justintv/Twitch-API/blob/master/v3_resources/follows.md

1 Like

I have a working example for you here: http://twitch.apiexampl.es/followers.php

You can see the examples source code at: http://twitch.apiexampl.es/followers.txt

Other examples are visible in the same manner at http://twitch.apiexampl.es/ Please take a look at the http://twitch.apiexampl.es/_README.TXT about the new requirement of Client-ID. I have added a function that can be added to all these examples to switch from ā€˜file_get_contents’ to a function using cURL with the header easily set.

The example of this function can be seen at http://twitch.apiexampl.es/fgc2curl.txt

thanks ! but I don’t get it: why the php-script know that you want the followers-number… ? how do I get e.g. the ā€œstatusā€ ? or the number of viewers ?

Viewers would only be available while the channel is ā€œstreaming/liveā€

Same idea for the example: http://twitch.apiexampl.es/viewers.txt

Read the API documentation and understand what is being done.

ah no , I mean the current viewer number :confused:

  1. : is it possible to get the name of the last follower ? I don’t see this in thge api :confused:

The previous example: http://twitch.apiexampl.es/viewers.txt will query the API for the total number of viewers on a stream at the current time.

ā€œViewsā€ is how many times the channel has been seen.

These are 2 different numbers.

ahhh

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