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
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
- : is it possible to get the name of the last follower ? I donāt see this in thge api
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.