Tom6106181
Posts: 0
Joined: Fri Aug 02, 2013 12:39 pm

Facebook connect access_token renewing

Hi.
I have completed the tutorial :
http://docs.appery.io/tutorials/build...

Everything work just fine according to tutorial, but I am wondering about how to renew the access_token when it is not valid anymore?

I am using a login, and return screen "myAccountScreen".

I notice if I login, I get code + access_token as it should, but then "code" is used, and not valid anymore.

If I click one of my navigation button "My account", It try to get the access_token again, but as "code" is invalid, it return an error from facebook.

I am trying to wrap my head around the best approach for this, as your tutorial only goes trough a 1 time sign in process, and click a button to get data trough api.

Any suggestions?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Facebook connect access_token renewing

Hi Tom,
[quote:]but then "code" is used, and not valid anymore[/quote]Could you please tell in detail how this happens?

You can get code and access_token only once, when login. There must be no further problems. Could you please share your application with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a?

Tom6106181
Posts: 0
Joined: Fri Aug 02, 2013 12:39 pm

Facebook connect access_token renewing

I get invalid code if I try to retrieve a new access_token with it from Facebook (eg, reloading the myAccountScreen)

According to Facebook docs, access_code will expire, and how to renew it?

Check if access_token is valid, if valid = proceed, unvalid = dosomthing to renew it

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Facebook connect access_token renewing

Tom,

I see. I'm afraid this is outside the scope of our support. You can check these links. hope they will be helpful:
https://developers.facebook.com/blog/...
http://stackoverflow.com/questions/67...

Return to “Issues”