iOS SDK reporting "user denied" when authenticating on test device - ios

Building an app using the Facebook iOS SDK. When testing on the simulator, I am able to log into Facebook (using Mobile Safari) and get a valid auth token. However, when I move to my testing device (iPhone 3gs running 4.3), after authenticating in the Facebook App, it returns with:
fb{APP_ID}://authorize#error=access%5Fdenied&error_reason=user%5Fdenied
Is there something special I need to do on the device or in the Facebook application itself?

Found out that this happens if your Bundle ID in your Facebook Application does not match the one in your iOS application. After updating both to match the same string, the authentication worked as expected. To my Facebook Overlords: this seems like a case where a different error string would be appropriate. Perhaps
Application Bundle ID could not be validated.
or similar.

If you've never deployed your app to the App Store or if the app is in Facebook's sandbox mode, users will need to be registered (for example, as testers, developers, or administrators) with Facebook for your app. Go to your app's admin page on Facebook, click Edit Settings in the upper right corner, then click Roles on the left side. There you can add developers and testers.

Related

Facebook review required for iOS apps that have the SDK just for app install ads?

I have an app in the Appstore for a few months now. To use App Install optimized Facebook ads, I decided to integrate The Facebook SDK. But apart from running Ad Campaigns on Facebook, I am not using any of the functionalities offered by the Facebook SDK. i.e. I am not using Facebook login and the services used with Facebook Login.
I noticed that the Facebook app is in Sandbox Mode and I need to set it to Public to use Facebook App Install advertising. I can set it to public right away, which is good.
But there is also a Facebook review submission button on the same page and there is a not-so-clear statement on the page saying Facebook needs to review "some" of the integrations before going live.
If I am using the SDK just for Facebook Ads with my "iOS App", do I still need to have my app reviewed by Facebook?
Cheers,
Taner
If you are not requesting to use any of the permissions, you do not need to have your app reviewed.
The only thing you need to do the enable it to be used for advertising is to set it to be Public. This will not really do anything in your case.

iOS Facebook Authentication PhoneGap on TestFlight

I'm currently testing my app on my iPhone that I built using Phonegap's Adobe Build with Apple's TestFlight application. My app contains Facebook authentication and when I click the authentication button I am presented with the following error:
Given URL is not allowed by the Application configuration: One or
more of the given URLs is not allowed by the App's settings.
It must match the Website URL or Canvas URL, or the domain must
be a subdomain of one of the App's domains.
I did a bit of research online and I added the iOS Platform along with my Bundle ID in the respective field on facebook's developer panel but that did not appear to fix things.

facebook requests from ios apps are not showing in facebook mobile app

I have an iOS app and a corresponding Facebook app. When I send Facebook requests from the iOS app, they do show under https://www.facebook.com/appcenter/requests but not in the mobile Facebook app.
The Facebook app is set up as follows:
Basic settings:
Display name, Namespace, Contact email - filled in
App domains - blank
iOS settings:
Bundle ID - filled in
URL scheme suffix, iPhone Store ID, iPad Store ID - blank (app not submitted to Apple yet)
Single sign-on, Deep linking - both checked
What am I missing?
Solution:
I had to fill in at least the iPhone Store ID in iOS settings. Since I didn't have an app ID, I had to simply pick an existing app's ID and enter it there.
I believe this ID is only needed to tell Facebook app where to take the user that doesn't have this app installed, but apparently Facebook is also using it as an indication that the app actually exists. Very insidious of Facebook, if you ask me.

Trigger.io Facebook "Login Failed, EXPECTED_FAILURE"

I am having many issues with connecting my Trigger.io 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'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.
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:
Remove my app from Facebook > Account Settings > Apps > Apps you use on facebook.com
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.

Share Facebook App ID across multiple apps

I have a Facebook app ID which I'm using on 6 iOS apps for sharing posts on the user's timeline using Single Sign-on (SSO).
I have setup the custom URL Scheme suffix described here and it's working fine right now.
My question is regarding the "iPhone App Store ID" and "iPad App Store ID" fields listed on the Facebook app settings. From what I understood here, these IDs would only be used if the user started an action on the Facebook app that would required my app to be installed. It would then be redirected to the AppStore ID listed on those fields.
My question is: is this really what these fields are for? I'd rather not forward the user anywhere (leave this blank?) but it's not allowed. Maybe I should just fill it with my app's free version AppStore IDs?
If you fill in those values, users who have your Facebook app installed will see the icon for your iOS app appear in the applications sidebar within the native iOS Facebook app on their iPhone.
Tapping that icon will then either launch your native app (if it's installed) or take them to the App Store page for that app so they can install it.
If you are using your Facebook app with multiple iOS apps, then you'll either have to pick one of your native apps to be the native app that represents your Facebook app, or just leave the fields blank.
There is no way to associate multiple native apps with a single Facebook app AFAIK.

Resources