[AC-1648] Android facebook.logout() is result in token expiration
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-07-21T17:06:52.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Appcelerator Modules, Titanium SDK & CLI |
Labels | n/a |
Reporter | Anis Vora |
Assignee | Mauro Parra-Miranda |
Created | 2014-06-27T08:05:50.000+0000 |
Updated | 2016-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
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
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
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
Here is screen shot for settings and module version available
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
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
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
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
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
Hi, Here maybe a useful doc to achieve. Extending Page Access Tokens, from https://developers.facebook.com/docs/facebook-login/access-tokens/. Regards, Shuo
Hello, did the last comment help you? Best Regards
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
The customer implemented the alternative we suggested.