0
votes

I'm using the FB PHP API some time ago. Now, when facebook deprecated the offline_access, some things change. Well, i'm disable in my app config the offline_access yet.

I make the login, user authorize my app, and return to my page. This token has 60 days expiration time. According to what I read in forums (and I check this) when an access_token expire, there is no way to renew this. For this reason, I trying to extend the access token before the 60 days expiration time.

    $this->_oauthRequest(
        $this->getUrl('graph', '/oauth/access_token'),
        $params = array(    'client_id' => $this->getAppId(),
                            'client_secret' => $this->getAppSecret(),
                            'grant_type'=>'fb_exchange_token',
                            'fb_exchange_token'=>$this->getAccessToken(),
                      ));

Now, is there any way to know or set the expiration time of the extended access_token? ergo, I need to know when this "extendes access token" will be expire aprox, to extend it again before its expire.

I hope you understand my English! :) Thanks guys!

1

1 Answers

0
votes

You can only renew resp. extend a long-lived access token if you get a short-lived one first – and that requires that the user interact with you app.