Page 1 of 1

Facebook connect access_token renewing

Posted: Wed Feb 05, 2014 10:07 pm
by Tom6106181

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?


Facebook connect access_token renewing

Posted: Thu Feb 06, 2014 7:25 am
by Kateryna Grynko

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?


Facebook connect access_token renewing

Posted: Thu Feb 06, 2014 7:51 am
by Tom6106181

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


Facebook connect access_token renewing

Posted: Thu Feb 06, 2014 8:25 am
by Kateryna Grynko

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...