FB app misconfigured for Facebook login

Hey,

I’m using the code snippet from here: http://www.coronalabs.com/blog/2011/12/16/uploading-photos-to-facebook-in-corona/

It all works fine in Xcode simulator because it uses the browser to log into Facebook. If deleting the official Facebook application from the device, it starts using the browser and works fine.

When it uses the facebook application I get this error: “App is misconfigured for Facebook login. Press Okay to go back to the application without connecting it to Facebook.”

On facebook developer portal I have filled in the information required for Native iOS App (Facebook Login: Enabled)

Not sure what the problem is or if it needs some more configuration to make it work inside their application.

Thanks. [import]uid: 70003 topic_id: 33554 reply_id: 333554[/import]

Can you provide a screen shot of your Facebook App settings as you have them setup at developers.facebook.com? We also need to see your build.settings file too. [import]uid: 199310 topic_id: 33554 reply_id: 133357[/import]

http://i48.tinypic.com/jttqom.png

settings =  
{  
 orientation = {  
 default = "landscapeRight",  
 supported = { "landscapeRight", "landscapeLeft"}  
 },  
  
 iphone =  
 {  
 plist=  
 {  
 UIHiddenStatusBar= true,  
 CFBundleIconFile = "Icon.png",  
 CFBundleIconFiles = {  
 "Icon.png",   
 "Icon@2x.png",  
 "Icon-72.png",   
 },  
 UIApplicationExitsOnSuspend = false,  
 CFBundleURLTypes =  
 {  
 {  
 CFBundleURLSchemes =  
 {  
 "fb113251008834116",  
 }  
 }  
 }  
 },  
 },  
}  

I’m also using the correct id when using the facebook api. [import]uid: 70003 topic_id: 33554 reply_id: 133362[/import]

@beckslash

This is commons issue we encounter when we add fb functionality to our app on android, however, solution is simple.

goto https://developers.facebook.com/apps > edit app > Native android app>

add some random value in “Key Hashes” field.

Now open ur app/game connected with logcat, and try to post on fb, it will show u missconfig error, its ok, now press Ok button on top right corner,
Now you can see error saying invalid hash key, something like,

Facebook: the hash key doesn’t match the key “asfdgasdfgetcetc”
(i don’t exactly remember the error msg, but you should get idea)

Now, “asfdgasdfgetcetc” is ur realy hash key for ur app/game, just copy and past into hash keys field in fb app setting page, and see the result :slight_smile:

Note: if u don’t have ddms/logcat or pc then u can install https://play.google.com/store/apps/details?id=org.jtb.alogcat in ur android device :slight_smile:
Regards,
Rajendra [import]uid: 147582 topic_id: 33554 reply_id: 133364[/import]

@neostar20 Thanks for the tips for Android. But atm I’m only focused on iOS. [import]uid: 70003 topic_id: 33554 reply_id: 133366[/import]

There are a couple of immediate issues I see.

  1. Bundle ID should be: com.funvisionstudios.test
    Take off the 10 digit code before the .com

  2. This Bundle ID must match what are building with. You can’t use the wildcard app ID or a different one.

  3. iPhone App Store ID and iPad App Store ID must be the app id of some live app in the store.

Fix up those things and give it a go! [import]uid: 199310 topic_id: 33554 reply_id: 133369[/import]

@beckslash

Thanks for letting me know.

Please double check your app’s bundle id at build setting and at fb app setting page, they should match.

You should add bundle id in build setting file.

Regards,
Rajendra [import]uid: 147582 topic_id: 33554 reply_id: 133368[/import]

The problem were those extra characters on the Bundle ID. Setting it to: com.funvisionstudios.test did the trick.

It works with either iPhone App Store ID set to 0 or to an existing app id. Fb only uses that for its deep linking. (In case someone has trouble with this topic.)

Thanks for the help Rob. [import]uid: 70003 topic_id: 33554 reply_id: 133371[/import]

Can you provide a screen shot of your Facebook App settings as you have them setup at developers.facebook.com? We also need to see your build.settings file too. [import]uid: 199310 topic_id: 33554 reply_id: 133357[/import]

http://i48.tinypic.com/jttqom.png

settings =  
{  
 orientation = {  
 default = "landscapeRight",  
 supported = { "landscapeRight", "landscapeLeft"}  
 },  
  
 iphone =  
 {  
 plist=  
 {  
 UIHiddenStatusBar= true,  
 CFBundleIconFile = "Icon.png",  
 CFBundleIconFiles = {  
 "Icon.png",   
 "Icon@2x.png",  
 "Icon-72.png",   
 },  
 UIApplicationExitsOnSuspend = false,  
 CFBundleURLTypes =  
 {  
 {  
 CFBundleURLSchemes =  
 {  
 "fb113251008834116",  
 }  
 }  
 }  
 },  
 },  
}  

I’m also using the correct id when using the facebook api. [import]uid: 70003 topic_id: 33554 reply_id: 133362[/import]

@beckslash

This is commons issue we encounter when we add fb functionality to our app on android, however, solution is simple.

goto https://developers.facebook.com/apps > edit app > Native android app>

add some random value in “Key Hashes” field.

Now open ur app/game connected with logcat, and try to post on fb, it will show u missconfig error, its ok, now press Ok button on top right corner,
Now you can see error saying invalid hash key, something like,

Facebook: the hash key doesn’t match the key “asfdgasdfgetcetc”
(i don’t exactly remember the error msg, but you should get idea)

Now, “asfdgasdfgetcetc” is ur realy hash key for ur app/game, just copy and past into hash keys field in fb app setting page, and see the result :slight_smile:

Note: if u don’t have ddms/logcat or pc then u can install https://play.google.com/store/apps/details?id=org.jtb.alogcat in ur android device :slight_smile:
Regards,
Rajendra [import]uid: 147582 topic_id: 33554 reply_id: 133364[/import]

@neostar20 Thanks for the tips for Android. But atm I’m only focused on iOS. [import]uid: 70003 topic_id: 33554 reply_id: 133366[/import]

There are a couple of immediate issues I see.

  1. Bundle ID should be: com.funvisionstudios.test
    Take off the 10 digit code before the .com

  2. This Bundle ID must match what are building with. You can’t use the wildcard app ID or a different one.

  3. iPhone App Store ID and iPad App Store ID must be the app id of some live app in the store.

Fix up those things and give it a go! [import]uid: 199310 topic_id: 33554 reply_id: 133369[/import]

@beckslash

Thanks for letting me know.

Please double check your app’s bundle id at build setting and at fb app setting page, they should match.

You should add bundle id in build setting file.

Regards,
Rajendra [import]uid: 147582 topic_id: 33554 reply_id: 133368[/import]

The problem were those extra characters on the Bundle ID. Setting it to: com.funvisionstudios.test did the trick.

It works with either iPhone App Store ID set to 0 or to an existing app id. Fb only uses that for its deep linking. (In case someone has trouble with this topic.)

Thanks for the help Rob. [import]uid: 70003 topic_id: 33554 reply_id: 133371[/import]