Facebook “Login Failed, EXPECTED_FAILURE”

I am having many issues with connecting my app with Facebook using forge.facebook.authorize.

Once I switched from a development to Ad Hoc distribution I am unable to login at all. I even went as far as deleting my Facebook Account from my iPhone to see if logging in through the Facebook app would work but that doesn't either. The error message is unhelpful.

Here's what happens when I get directed to the Facebook app:

Then when I click "Okay" it takes me back to the app and this is the only indication I get of what went wrong:

What does this error mean? Is there a configuration setting I haven't set right? What would cause this to work on development (simulator & device) but not Ad Hoc distribution?

All 7 of my testers that I distributed to have also reported problems with Facebook login. Although no 2 seem to be the same.


I had this same issue and the problem was that I had changed my app settings on Facebook and I guess data was being cached on the device that was preventing Facebook from authorizing the request.

To fix it, I did the following:

  1. Remove my app from Facebook > Account Settings > Apps > Apps you use on
  2. Call forge.facebook.logout() in my app to clear the cached data

I was then able to use forge.facebook.authorize. If you haven't changed your app settings, maybe just make sure you're calling forge.facebook.logout when the user logs out.

I've had a go at reproducing this and it seems to work fine for me on both iOS 5 with the Facebook app and iOS 6 logged in to the iOS facebook integration.

My best guess is that your adhoc app has a different package name to your development app and that was not configured in the Facebook developer center.

It's also worth noting that changing the Facebook developer settings can take some time to propagate to all of their servers, so if any changes you try don't work straight away make sure to try again a bit later.

Need Your Help

How do I attach java sources to project?

java intellij-idea websphere war web-deployment

I am developing a WebSphere portlet in IDEA 11. The portlet is using some methods defined on portal. I don't have the production environment compiled classes or jars on my PC but I have the source ...

Select and plot top frequencies with dplyr

r select ggplot2 count dplyr

The objective is to select/filter top 3 (or n) events that have the largest frequencies (occurrences) in a dataframe then plot these using a barplot in ggplot2.