For an application I am developing, we allow users to add a link to their Facebook Page (strictly page, not Profile, not Group, only a Page).
I cannot find anything
I have the similar task, first I ask Facebook for normalized URL (without !#, etc):
require_once('facebook.php');
function getNormalized($anylink){
$facebook = new Facebook(array(
'appId' => 'yourapplicationID',
'secret' => 'yoursecretcode',
'cookie' => true,
));
$res = $facebook->api(array(
'method' => 'fql.query',
'query' => 'select url, normalized_url from link_stat where url = "'.$anylink.'" ;'
));
if (!isset($res[0]['normalized_url']))
{
//If not isset -> set with dumy value, example
echo '
You have not entered Facebook Page URL or its not accessible. Please go back and try again.';
exit;
}
return $res;
}