My app uses Facebook PHP SDK 3.2.2 to authenticate users, what I've done so far:
$facebook = new Facebook(array('appId' => APP_ID,'secret' => APP_SECRET));
$fbme = $facebook->getUser();
if ($fbme) {
try {
$user_profile = $facebook->api('/'.$fbme);
catch (FacebookApiException $e) {
error_log($e);
$fbme = null;
}
}else{
$login_url = $facebook->getLoginUrl(array('scope' => 'email,publish_actions', 'redirect_uri' => $baseurl));
echo("<script>top.location.href = '" . $login_url . "';</script>");
die();
}
This code gets included at the top of every page. As you can see, is very basic. Everything works, the user gets authenticated but the sessions lasts very short, lets say, around 1hr. Is it possible to configure the FB session timeout anywhere? Thanks.