Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1648] Android facebook.logout() is result in token expiration

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2014-07-21T17:06:52.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator Modules, Titanium SDK & CLI
Labelsn/a
ReporterAnis Vora
AssigneeMauro Parra-Miranda
Created2014-06-27T08:05:50.000+0000
Updated2016-03-08T07:38:08.000+0000

Description

Hello, According to application requirements , we are getting access token using facebook.authorize() after posting one picture to user wall and then sending that token to our web server to get more details about that post (like count , comments count) at later. If we call facebook.logout() from our application that token is getting expired/invalid and we are not able to use that any more. Same thing is working fine with IOS , even after facebook.logout() token remain active. Before logout we tried to get long expired token and we are getting that successfully but after logout that new token also become expired/invalid. We needs to use faceboo.logout() because we need more than one user to share same photo using different account .. application is like KIOSK app where user came and go and they share photo with their account. Please please help to solve this , again everything working fine with IOS Regards, Anis

Attachments

FileDateSize
Screen Shot 2014-06-27 at 5.40.34 pm.png2014-06-27T12:12:53.000+0000144959

Comments

  1. Shuo Liang 2014-06-27

    Hi, Would you please update your Facebook module to 3.1.0, there is the doc http://docs.appcelerator.com/platform/latest/#!/api/Modules.Facebook. Regards, Shuo
  2. Anis Vora 2014-06-27

    Hello Shuo, Surly but can you tell me how to update that ? .. I already tried with titanium update check and nothing is found. Regards, Anis
  3. Anis Vora 2014-06-27

    Hello, I think 3.1.0 is only for IOS not for android , as I can see that my IOS module is set to 3.1.0 and android to 3.0.2. Regards, Anis
  4. Anis Vora 2014-06-27

    Here is screen shot for settings and module version available
  5. Anis Vora 2014-06-30

    Hello Shao, Please have some words for our problem , your help is highly appreciated. Because of this issue we are not able to roll-out our application to market. Regards, Anis
  6. Shuo Liang 2014-06-30

    Hi, Just to be clarified, the token you mentioned is one you get from method getAccessToken, right? And also the AccessToken should be cleared after logout method. Regards, Shuo
  7. Anis Vora 2014-06-30

    Hello, Yes I am getting that using getAccessToken. Sorry I am not getting meaning for "clear after logout method" , seems that you didn't understand my problem. I am sending that AccessToken to my server (web server) and then logout from application. At later-date I am using that access token from web server to get like,comment count of that post. Now that thing is working fine in IOS , I sent token to web server and called logout method from application and still that token is valid and can access details using that token. But in Android after logout from application , token get expired and could not use that anymore. Please advice. Regards, Anis
  8. Shuo Liang 2014-06-30

    Hi, Seems something wrong with IOS accessToken, the accessToken should be invalid after you call logout method. In other word, the accessToken should only valid when that use is in login status. Android's reaction is correct. Regards, Shuo
  9. Anis Vora 2014-06-30

    Hello Shuo, Oh that's bad , so what is solution of this. Wants to have that token for offline use , as my application is sort of kiosk application where user came and share photo using facebook. So I should logout previous user from application to allow second user to share same photo , and needs to have access token for building reports of that share. Please suggest some way to achieve that. Regards, Anis
  10. Shuo Liang 2014-06-30

    Hi, Here maybe a useful doc to achieve. Extending Page Access Tokens, from https://developers.facebook.com/docs/facebook-login/access-tokens/. Regards, Shuo
  11. Mauro Parra-Miranda 2014-07-18

    Hello, did the last comment help you? Best Regards
  12. Anis Vora 2014-07-21

    Hello Mauro, Yes , that help.. we dropped idea of using user token and now using application token to get required post details. Thanks lots for your help Regards, Anis
  13. Mauro Parra-Miranda 2014-07-21

    The customer implemented the alternative we suggested.

JSON Source