0

I have a problem that, I am using Facebook SDk for sharing products on Facebook in our Android App, its working fine but when we have logged into Facebook App preinstalled in Phone, and then we want to login in Facebook through our Application then it doesn't show Login Window. I don't know How this will managed in our code? \

Please help me out about this problem.

Thanks in advance.

Sanat Pandey
  • 4,081
  • 17
  • 75
  • 132

4 Answers4

2

If you want to show login dialog always, set Facebook.FORCE_DIALOG_AUTH option when you call Facebook.authorize() method.

Here's my code.

Facebook fb = new Facebook("1234567"); //your app key
return fb.authorize(this, PERMISSIONS, Facebook.FORCE_DIALOG_AUTH, fbDiagListener);
kingori
  • 2,406
  • 27
  • 30
0

kingori's solution is good but not the only one. You need to check the hash key in your app whether it matches with the one you pasted on the facebook console. I had the same problem and was solved by this method.

Nitesh Verma
  • 1,795
  • 4
  • 27
  • 46
0

FB app & your app have no connection. Implement FB Authentication flow. Check FB Dev site Its OAuth 2.0. Use Client side stuff as you are doing it inside your app.

Tom
  • 208
  • 1
  • 4
  • 11
0

I think your issue is mainly because of not correctly specifying the android key hash. Kindly go through the following link: "An error's occurred" when authenticating with Facebook's android sdk

Community
  • 1
  • 1
Basil
  • 2,163
  • 2
  • 16
  • 25