I'm using the read_stream permission to get comments,likes and shares info by a user on a particular page. For that I need a long lived access token as I need to poll the servers and update them periodically. But, when I do this:
if($user){
$user_profile = $facebook->api('/me','GET');
$facebook->setExtendedAccessToken();
$access_token=$facebook->getAccessToken();
function xy(){
xx...
}
I always get only a token that expires in one hour.
Is there something I'm missing? I'm using the PHP SDK