The following code will help you to get facebook page id from facebook page name.
$id = substr(strrchr($url,'/'),1);
$json = file_get_contents('http://graph.facebook.com/'.$id);
$json = json_decode($json);
return $json->id;
}
echo getFacebookId('https://www.facebook.com/pagename');
No comments :
Post a Comment