Possible Duplicate:
How to extend access token validity since offline_access deprecation
I try to get a long life access token (60 day expiration time) for my application. But all my tests give me only a short token.
What i do :
- First a do a classic "authentication" to get a short-life access token. So the url : GET graph.facebook.com:443/oauth/access_token?redirect_uri={my_callback}&code={the_code_given_by_fb}&client_id={my_client_id}&client_secret={my_client_secret}
=> Give me two data access_token (a long string) and expire ( about 4000 seconds)
- Then i want to transform my short life access to long life access, so i have try to call :
GET graph.facebook.com:443/oauth/access_token?redirect_uri={my_callback}&code={the_code_given_by_fb}&client_id={my_client_id}&client_secret={my_client_secret}&fb_exchange_token={short_life_access_token}&grant_type=fb_exchange_token
=> This call give me, the same data that the first call (so no long life token)
I try also : GET graph.facebook.com:443/oauth/access_token?client_id={my_client_id}&client_secret={my_client_secret}&fb_exchange_token={short_life_access_token}&grant_type=fb_exchange_token
=> Same result
So i didn't understand what must we do, to get a long life access token ?