How do I PUT a follow into the Twitch JS SDK?

345 views
Skip to first unread message

Jason Axelrod

unread,
Mar 10, 2014, 4:30:21 AM3/10/14
to twitc...@googlegroups.com

One more important question... Using the following code, I can check if a user is following a channel:

Twitch.api({method: 'users/'+user+'/follows/channels/'+channel}, function...  


That of course is a GET... in order to have someone click a button and follow the channel, I have to use the same method, with a PUT. How would I do this with the JS SDK?



I also have more questions, which I have explained in more detail here:

http://discuss.dev.twitch.tv/t/twitch-tv-js-sdk-not-retaining-session-grant/552

Teak Topham

unread,
Mar 10, 2014, 9:56:23 PM3/10/14
to twitc...@googlegroups.com
Have a look at the following api docs link:


This will allow you to add follows for the logged in user. It requires that the user be authenticated with twitch, meaning you have possession of an oauth access token for the user. It also requires the user scope 'user_follows_edit'.
Reply all
Reply to author
Forward
0 new messages