从PHP扩展Facebook令牌有时会延长

I am using the PHP Facebook SDK. When I receive a user token, I attempt to extend it as suggested like so:

$fb_config = array('appId'  => $app_id, 'secret' => $secret);
$facebook = new Facebook($fb_config);
$facebook->setAccessToken($token);

if ($facebook->setExtendedAccessToken() !== false)
    echo "New token is $facebook->getAccessToken()";

When I check the token (which, in my experience, is usually different than the incoming token) against the facebook debugger*, the expiration is usually, "Never." However, with certain Facebook users, then new extended token still expires in "about an hour." I've noticed this happens with newer Facebook users, although that could be a coincidence.

*Sorry, I apparently don't have the reputation to post more than 2 links in a question

I guess it is the same problem mentioned here. In my case, they are not new Facebook users, so I guess there is no well defined pattern for when it occurs. There is a open bug that relates this.

Although, you can check here for the last answer from Facebook engineers, it may help you if it is the case when an user had previously given your app the offline_access permission.

For a workaround, I just created a new, similar Facebook app. Extending the token for a long-lived one works fine with the new app. Of course, I only use the app for logging in, so this solution may not be for everyone.