So, I’m still sorta having issues. Every time I try to get it, I get a JSON object spit back to me that basically says
{“error”:“Not Found”,“status”:404,“message”:null}
I get that from both the browser and command line w/ CURL
I am not too familiar with CURL w/ php so I just want to make sure I am getting this done right
$fields = array(
‘client_id’ => ‘p4axx80zlzi6t3kwc79ri3uu3kqpqi’,
‘client_secret’ => ‘ihopethiswasntyoursecret’,
‘grant_type’ => ‘authorization_code’,
‘redirect_uri’ => ‘xyz’, //Not my actual url
‘code’ => $_GET[‘code’]
);
$url = "https://api.twitch.tv/kraken/oauth2/token?" . http_build_query($fields);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
$data = curl_exec($ch);
Or am I needing to set this up another way?