ERROR: Unsupported get request. Please read the Graph API documentation ERROR: Unsupported get request. Please read the Graph API documentation curl curl

ERROR: Unsupported get request. Please read the Graph API documentation


When using Graph Explorer, an Access Token is automatically added to each request. If you do the same request via cUrl without explicitly adding an Access Token as URL parameter, then it will fail.

You need to add the access_token parameter to your call, and an Access Token with manage_pages permission (replace {access_token}).

<?php  $url='https://graph.facebook.com/v2.3/me/accounts?access_token={access_token}';  $ch=curl_init();  CURL_SETOPT($ch,CURLOPT_URL,$url);  CURL_SETOPT($ch,CURLOPT_RETURNTRANSFER, 1);  $json=json_decode(curl_exec($ch));  var_dump($json);?>