Hello , can some body help me with this code?
I was use this code before , but now it`s not work as I understand becouse I need to add Client ID…
I have tried to add Client Id like this
$.getJSON("https://api.twitch.tv/kraken/channels/esl_csgo.json?client_id=client_id?callback=?",
Try:
$.getJSON("https://api.twitch.tv/kraken/channels/esl_csgo?client_id=YOUR_CLIENT_ID")
This is my original code , for example (esl_csgo)
div id=“SHOWDIV”></div
function showImage(d){
alert(d.logo);}
$.getJSON("https://api.twitch.tv/kraken/channels/esl_csgo.json?callback=?", function(d){document.getElementById(“SHOWINDIV”).innerHTML += ‘
’;});
So I edit it to
function showImage(d){
alert(d.logo);}
$.getJSON("https://api.twitch.tv/kraken/channels/esl_csgo?client_id=MY_CLIENT_ID?callback=?", function(d){document.getElementById(“SHOWINDIV”).innerHTML += ‘
’;});
3ventic
4
? starts the url params, which are separated by &, change the ? between the client id and callback in your request url.
Read up on query string parameters and how to pass multiple. Your query string is malformed currently.
system
Closed
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.