Removed your leaked access_token
$result = curl_exec($ch);
$token = json_decode($result);
Looks like you didn’t JSON Decode the token response before trying to use the token
Removed your leaked access_token
$result = curl_exec($ch);
$token = json_decode($result);
Looks like you didn’t JSON Decode the token response before trying to use the token