I want to embed a follow button on my website since I have a external based page for people to see our streams. Can someone help me?
I’m not sure if you can embed the same button that’s on twitch, but you could always make your own! To follow a new channel, you can make a PUT call to https://api.twitch.tv/kraken/users/test_user1/follows/channels/CHANNEL_TO_FOLLOW. The API documentation about it can be found here.
And where you find the user nickname ?
In this link, the user is
USER, and the channel is
CHANNEL_TO_FOLLOW. As far as gathering the username and channel name goes, that’s up to the web developer. Since this requires the application to be authenticated with the
user_follows_edit scope, I would suggest making a call to to the api root with the token to get the username (Documentation).
hummm, but I don’t want to use the twitch login for just get an username :o
If someone’s following a channel, they’re gonna have to be logged in anyway!
Yes but they are already looged from twitch. Tv and we have to logged them from our Web site for use the twitch Js Sdk for get the nickname
Im trying to find a solution for get the nickname whithout to log them again in our application
If you have the user logged in to your site, and have enabled the SDK, you should already have access to their username.
If you have the user log into twitch via your site, you should already have access to their username.
If all else fails, you could always send their username/token through the page via a URL parameter.
I suppose I might be having trouble finding out exactly what you’re asking for.
Sorry for my english.
I’m just trying to find an embed iframe (or something else) for get this follow button.
Because, I don’t want to create an application, and use the auth api just for add this button on my website.
Fair enough. You cannot create your own follow button without using the API. As I stated in my first answer, I have no clue if you can/how you can embed the follow button.