Skip to content

quack79/streambadge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

As this code uses the Twitch API, you need to register your application on the Twitch Developers site.

When creating the app, you will need to enter an OAuth redirect URL - use the URL where the script will be located.

Choose "Website Integration" as the category and "Confidential" as Client Type

Once you create a developer application, you are assigned a client ID, and you will need to create a client Secret.

You will need to edit index.php and update the following constants:

const TWITCH_CLIENT_ID = 'CHANGEME';

const TWITCH_CLIENT_SECRET = 'CHANGEME';

Check the location where the token will be saved on your server. It must NOT be publically accessible.

Upload the files to your server and place this code in your HTML:

<iframe src="/streambadge/?user=TWITCHUSERNAME" name="twitch-status" scrolling="no" height="50px" width="220px" style="border: none;"></iframe>

Replace TWITCHUSERNAME with the channel name you require.

The Twitch API/token helper logic is now embedded directly in index.php.

About

A PHP script to add a LIVE NOW indicator to a webpage for Twitch streamers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages