У меня был пример реализации входа в facebook, и я только что понял, что он перестал работать:
<?php
// Create our Application instance (replace this with your appId and secret).
$facebook = new Facebook(array(
'appId' => 'myappid',
'secret' => 'mybigsecreet',
'cookie' => true,
));
// We may or may not have this data based on a $_GET or $_COOKIE based session.
//
// If we get a session here, it means we found a correctly signed session using
// the Application Secret only Facebook and the Application know. We dont know
// if it is still valid until we make an API call using the session. A session
// can become invalid if it has already expired (should not be getting the
// session back in this case) or if the user logged out of Facebook.
$session = $facebook->getSession();
$me = null;
// Session based API call.
if ($session) {
try {
$uid = $facebook->getUser();
$me = $facebook->api('/me');
$r = new registro_usuarios();
$r->facebook($uid,$me['name'],'https://graph.facebook.com/'.$me['id'].'/picture');
echo '----------------------------'.$me;
} catch (FacebookApiException $e) {
error_log($e);
echo '----------------------------'.$e;
}
}else echo 'nosession';
echo $session;
печатает nosesion
, но когда я нажимаю кнопку входа (facebook), журналы firebug: FB.login() called when user is already connected.
и всплывающее окно входа (facebook) не открывается.
Что мне не хватает? Через год facebook-api устарел??