0
votes

I am creating access token using this:

https://graph.facebook.com/oauth/authorize? client_id=127605460617602& scope=read_stream,user_photos,user_videos,publish_stream& redirect_uri=http://www.example.com/

then, It is giving me an access token which is valid for a limited time period.

after that i was using offline_access prms like this:

https://graph.facebook.com/oauth/authorize? client_id=127605460617602& scope=offline_access,read_stream,user_photos,user_videos,publish_stream& redirect_uri=http://www.example.com/

then, It is giving me permanent access token.

Is there any way to create a access token according to my expiration time.

can any one help me.

2

2 Answers

3
votes

I am afraid this is not possible. BUT you may use the following to "expire" the session (using PHP-SDK):

$facebook->setSession(null);
1
votes

This is not possible, you can either have the facebook-defined expiry or the never-expires offline access token.