Facebook Login flow in Android

0 votes
Hi, I created a game that connects with Facebook. All seems to work very well if the user follows all the steps correctly.

 

The problem I'm having is that when the user, in an Android phone, gets asked by the phone to choose between browser, if the user doesn't choose any, by pressing the back button, the app just hangs on waiting for any facebook input, wich will not ocurr.

 

Is there any Exception that I may cach to handle that sceneario?

 

Thanks in advance.
asked Apr 10, 2015 in App42 Cloud API-BaaS by jpgb010 (10 points)
Are you using Facebook SDK for Authentication? Can you please let me know the error that you are getting on console?
I'm using pp42API.BuildSocialService().DoFBOAuthAndGetToken

The problem is, I'm not getting any errors, it justs waits for Facebook's reply and will get nothing because the user closed the web browser.

1 Answer

0 votes

Hello,

In such case, you can easily handle it by setting the attempt your app is making to fetch access token. By  default its 30 attempts which are going in the process if user closed the browser. Please find a below code snippet to set the max attempt

SocialService.MAX_ACCESSTOKEN_ATTEMPT = 1

Using the above code snippet, you will find an exception message after one attempt, please check and let us know if it helps. 

Thanks,

Himanshu Sharma

 

answered Apr 17, 2015 by hs00105 (2,005 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...