Android : Facebook Api Works Well... Except In The Facebook App...

Hello,

I have a problem with Facebook API on android. it works perfectly when the Facebook app is not installed on my device: I can log in, post messages or photos, everything is ok. But when I install the Facebook app, nothing works at all… I can’t even log in. The message is “Myapp is misconfigured for Facebook login.”

Someone has encountered this problem? Is there a solution?

When you don’t have the Facebook App installed, the Facebook library will make calls to the web browser to manage the login.

If you have the app installed, it uses Facebooks Single Sign On (SSO) to work.  There are things you have to do to setup things on facebook.  There are things you have to put into your build.settings file.  And more important, there is a key string (which should print in your console log) that you need to add to the facebook developer portal setup.

See our guide on this:  http://docs.coronalabs.com/guide/social/setupFacebook/index.html

In particular check out the bits about the key hash.

thank you Rob !

all things are right on facebook portal
and in the build.settings file, i follow the process step by step and
all seems to be ok. I just miss the key string in the log console.
How can i get it on my device ?

From the command line/terminal execute the:

adb logcat

command, which will spit out a lot of messages.  Start your app, when it logs in you should get an error message about the key hash being wrong.  The right keyhash will be printed in the log file.  Copy and paste that into the right place in the developers.facebook.com portal.

It works ! Thanx again rob.  :slight_smile:

When you don’t have the Facebook App installed, the Facebook library will make calls to the web browser to manage the login.

If you have the app installed, it uses Facebooks Single Sign On (SSO) to work.  There are things you have to do to setup things on facebook.  There are things you have to put into your build.settings file.  And more important, there is a key string (which should print in your console log) that you need to add to the facebook developer portal setup.

See our guide on this:  http://docs.coronalabs.com/guide/social/setupFacebook/index.html

In particular check out the bits about the key hash.

thank you Rob !

all things are right on facebook portal
and in the build.settings file, i follow the process step by step and
all seems to be ok. I just miss the key string in the log console.
How can i get it on my device ?

From the command line/terminal execute the:

adb logcat

command, which will spit out a lot of messages.  Start your app, when it logs in you should get an error message about the key hash being wrong.  The right keyhash will be printed in the log file.  Copy and paste that into the right place in the developers.facebook.com portal.

It works ! Thanx again rob.  :slight_smile: