¿Por qué este código arroja un error API 191 de Facebook?
Tengo el siguiente archivo config.php en www.sitename.com/facebook
<?php
require_once 'library/facebook.php';
$app_id = "xyz";
$app_secret ="xyz"
$facebook = new Facebook(array (
'appId' => $app_id,
'secret'=> $app_secret,
'cookie'=> true
));
if(is_null ($facebook->getUser()))
{
header("Location:{$facebook->getLoginUrl(array('req_perms'=>'user_status, publish_stream, user_photos'))}");
exit;
}
?>
La URL del sitio utilizada para registrar la aplicación eshttp: //www.sitename.com/facebook
so ejecutar este archivo debería dirigirme a una página de autorización ... en su lugar, aparece el siguiente error:
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: redirect_uri is not owned by the application.
Puede alguien explicar cómo solucionar esto y por qué sucede esto?