Let's discuss your "Twitch.tv App"

@ALF3run Offline users are shown undefined !

3 Likes

Thanks, I didn’t know about the new Client_id policy, it worked well until now. I’ll fix it as soon as possible.

Thanks for the article, it was really helpful and clarifying

My twitch.tv app: http://codepen.io/svmi3195/full/JKzXPZ/

Hey, here’s a question for you, svmi3195. I’ve run into trouble with the Client-ID issue. Yours is working, so you must be doing it right. For me, I just now (less than an hour ago) registered my app with Twitch and got a Client ID. As far as I can tell, I’m formatting my ajax calls the same as you. It may just be that my new Client ID hasn’t had time to “become official” with them? And I wasn’t sure what to put in the “Redirect URI” box when they requested one, so I just put my Codepen URL (minus the ?editors=0011 part), but I don’t think that matters; it seems to be more of a OAuth thing.

Anyway, can you or anybody else spot anything I’m doing wrong? http://codepen.io/AbdiViklas/pen/PzgRbj?editors=0011

Edit: I should add that one of my calls, https://api.twitch.tv/kraken/streams/?channel=, is working and the other two aren’t. Also even the ones that aren’t work in Postman now that I include the Client ID in headers (which I guess suggests the problem isn’t that it’s too new…).

I made it yesterday without client id and it worked. Today in the morning one my call was working and others didn’t. I registered same way as you, gave the link to my codepen, and it was working immediately.

It might be more useful if you would log error’s message, it may say something.

I am having the same issues. I registered it just now, but not working yet. If anyone can help, that would be great. thanks all!

Remove callback, set data type to json.

Twitch TV streamer API has problem now. All the projects don’t work now. Can anybody answer my question please.

Read last ten posts in this topic.

My twitch.tv app : https://stephaneleveugle.github.io/Twitch_Player/

I added the possibility to watch the online streams directly from the app.
I switched to github to make the twitch player work, codepen’s iframe makes it impossible(i think?) to work.
Any feedback is appreciated.

Source code : https://github.com/StephaneLeveugle/Twitch_Player

4 Likes

A job well done my friend!:raised_hands::clap:

I added the capability to search and add channels, delete them, and save the list to localStorage. (And used official Twitch colors!)

This looks good. But where are you streamers who no longer have an account, or have a 404 error because they are not found?

So I fixed my Twitch app by changing my .getJSON() calls to .ajax(), removing the callback, and adding the client ID headers. It seems to work fine. Now I’m having a strange issue when I click on a user link. The links send me to the correct page but it fails to completely load. If I copy the web address to a new tab it works fine. It’s like the twitch site would rather not get linked to by my app directly. I get this behavior in both Firefox and Chrome. The same thing seems to be happening with everyone’s twitch app. Any ideas as to what might be happening here?

Here’s my code pen: http://codepen.io/LarryMary/pen/NRNAay

2 Likes

Forgot about that, thanks. Added (li 39-40 now). I don’t like that user story much; it seems like it would be more elegant to fail silently and continue to the next name on the list. The only reason there would be a 404 is if the one of the original channels I program in closes later, and why call attention to that? Oh well.

Hey Guy’s!

Check out mine.
Project Link - http://codepen.io/nawazish/full/ZpOkzw

Also see this link if your twitch app is not working. Twitch api now requires Client ID header.

1 Like

Live Demo:
https://asimolovegym.github.io/Twitchtv-JSON-API/

Project Code Detail:

I used two AJAX,
https://api.twitch.tv/kraken/channels/” for detailed information (even it’s offline).
https://api.twitch.tv/kraken/streams/” only for online/offline status.

This is a much harder project comparing to previous API project, as nawazishali mentioned above, twitch.tv API right now request Client ID, that’s why lots of previous post (and the one in project demo) doesn’t work anymore.

Any comments are welcome!

1 Like

Well, I don’t know what it means, but when I open the page and view console, I see “Uncaught SecurityError: Failed to set the ‘domain’ property on ‘Document’: Assignment is forbidden for sandboxed iframes.” Still looking…