stdClass Object ( [error] => stdClass Object ( [message] => Missing redirect_uri parameter. [type] => OAuthException [code] => 191 ) )
I get this message when I send access_token to graph.facebook.com/oauth/me
if($result){
print_r(get_data($result));
}
function get_data($token){
$ku = curl_init();
$query = "access_token=".$token;
curl_setopt($ku, CURLOPT_URL, "graph.facebook.com/oauth/me?".$query);
curl_setopt($ku, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($ku);
return json_decode($result);
}
The API endpoint to get basic user information is
graph.facebook.com/me
, notgraph.facebook.com/oauth/me
. You should add "https" too:https://graph.facebook.com/me
.