Código:
<?php
require 'facebook.php';
//facebook application
//set facebook application id, secret key and api key here
$fb['appid' ] = "152687434769564";
$fb['api' ] = "f7655cb8e9497827b08ea0e068ff8a91";
$fb['secret'] = "************************";
$fb['baseUrl'] = "http://www.tecnovacartama.com/facebook3/";
$fb['appBaseUrl'] = "http://apps.facebook.com/tecnovainforma/";
$fb['cvUrl'] ="http://www.tecnovacartama.com/facebook3/";
$fb['cvPage'] = "http://apps.facebook.com/tecnovainforma/";
$facebook = new Facebook(array(
'appId' => $fb['appid'],
'secret' => $fb['appsecret'],
'cookie' => true,
));
$session = $facebook->getSession();
$loginUrl = $facebook->getLoginUrl(
array(
'canvas' => 1,
'fbconnect' => 0,
'req_perms' => 'email,publish_stream,read_stream,user_photos'
)
);
$me = null;
if(!empty($session)){
echo "<script type='text/javascript'>top.location.href='".$loginUrl."';</script>";
exit;
}else{
try{
$uid = $facebook->getUser();
$me = $facebook->api('/me');
}catch(FacebookApiException $e){
echo $e;
}
}
?>
Siempre se produce la excepción
OAuthException: Invalid OAuth access token signature
Se que en la pagina
http://developers.facebook.com/docs/authentication/ hay documentación sobre el tema pero
pero no se como arreglarlo exactamente
¿alguna idea?