● Twitch Status Block *UPDATE*

Mon Oct 17, 2016 8:06 pm
Clan Leader
Top Dog
Nuke Dev / Coder
3041 Posts
coRpSE
In-Game
Once Human

Most Played:
This week: 134.8hrs.
Total Played: 135hrs.


  
Reputation: 7383.9
votes: 7
Well, today, during my stream, I was informed by a clan mate of mine that the twitch status block was not working on our site. So, after the stream, I took a look into it to see if I could find out what was causing the issue and fix it. Well, it came down to Twitch API now requires a client ID. So a few changes are needed. For now, I will tell you the code edits that needs to be done, and I will be updating the block download on this site within the next few days.

  1. First off, you will need to do these 2 code edits.

    OPEN: public_html/includes/twitch_status.js

    FIND: (should be the first line pretty much)

    PHP:  [ Select all ]

    var twitchUserName 


    There is more to the line, but you have a different twitch name as me so just find that line that starts with that.

    AFTER THAT LINE, ADD


    PHP:  [ Select all ]

    var twitchClientID 'YOUR-TWITCH-CLIENT-ID' // get client ID here: https://www.twitch.tv/kraken/oauth2/clients/new 

     



    Next FIND:

    PHP:  [ Select all ]

    ?callback=?



    REPLACE WITH:

    PHP:  [ Select all ]

    ?client_id="+twitchClientID 



  2. Well, if you want the client ID for this application, you have to download the block or get your own. I have included my client_id for this script since they got back to me saying its "semi-public", which makes very little sense.



  3. With your Client ID you have now, or mine from this script, replace the YOUR-TWITCH-CLIENT-ID from the first PHP edit I had you do. DO NOT REMOVE ANY OF THE QUOTES ( ' ).


  4. Save the file and upload it to your site and you are all set.


I hope this was helpful and if you have any questions, feel free to ask.


Expand
Tue Oct 18, 2016 8:58 am
NOOB!!!
38 Posts
Reputation: 65.8
Oh, i was going to ask you about that soon  hrm  nice!
Tue Oct 18, 2016 9:45 am
Original Poster
Clan Leader
Top Dog
Nuke Dev / Coder
3041 Posts
coRpSE
In-Game
Once Human

Most Played:
This week: 134.8hrs.
Total Played: 135hrs.


  
Reputation: 7383.9
votes: 7
— GuilhermeTozzi wrote
Oh, i was going to ask you about that soon  hrm  nice!


SSSSSSSSuuuuuuuuuuuurrrrrrrrrrreeeeeeeeeeeee you were. zunge zeigen lol.


 
Thu Oct 20, 2016 10:14 am
NOOB!!!
38 Posts
Reputation: 65.8
— coRpSE wrote
SSSSSSSSuuuuuuuuuuuurrrrrrrrrrreeeeeeeeeeeee you were. zunge zeigen lol.


loooool  :wink:


 
Fri Oct 21, 2016 12:03 pm
Original Poster
Clan Leader
Top Dog
Nuke Dev / Coder
3041 Posts
coRpSE
In-Game
Once Human

Most Played:
This week: 134.8hrs.
Total Played: 135hrs.


  
Reputation: 7383.9
votes: 7
Block in the downloads has now been updated.


 
Mon Oct 24, 2016 9:28 am
Original Poster
Clan Leader
Top Dog
Nuke Dev / Coder
3041 Posts
coRpSE
In-Game
Once Human

Most Played:
This week: 134.8hrs.
Total Played: 135hrs.


  
Reputation: 7383.9
votes: 7
I updated it again to now include my Client ID. They finally got back to me saying it is "Semi public", which makes little sense to me. But instead of being a application id, they called it a client id, and said it should be included with the script, but just don't go publicly posting the id on forums. I guess they didn't really think things through when they forced this upon us.


 
Forums ©