Facebook iOS native application SSO not working? - ios

I am trying to make a Facebook native iOS application, using the iOS tutorial. I did exactly as instructed, the build is successful but instead of a normal Safari login page - I only get two buttons, Cancel and Login and they don't work.
I tried the HackBook example, and it has the same exact problem when I click the login using the Facebook button.
I am using Xcode 4.2 on Mac OS X v10.7 (Lion).
What may the problem be?

OK, found the problem. I tried to run it on my iPhone and it works fine.
I logged out of my Facebook acount on the emulator and then tried to run the applications - it worked!
Strange, but it does the trick.

Related

Unity Facebook SDK IOS 9.2 Not Returning to app

I started noticing that on IOS 9.2, using Unity Facebook Plugin 7.3.0 with the server and app white lists provided https://developers.facebook.com/docs/ios/ios9#whitelistapp When I issue my login call it opens the login page like normal but never returns to the app and if i manually return to the app its returning that the user is not logged in. It sits at this screen. It also works correctly on android and previous ios versions, so its something with IOS 9.2
Anyone else that might have an issue with this. One of the plugins used was using openURL in the native project and not returning the proper response. So thats why it wouldn't return nor the correct data was passed.

Facebook iOS SDK native login not working

I've implemented facebook sdk into my project and everything is setup exactly as shown in guide https://developers.facebook.com/docs/facebook-login/ios/v2.0, including info.plist file.
FacebookAppID, FacebookDisplayName and URL types are set (see image)
Everything is working when I use facebook app login, or browser login, but when I've added account into devide, so iOS native login dialog should be present, nothing happend, log only displays User cancelled every time I press Facebook login button.
I've done several projects before with facebook login implementation and I've not experienced this error. I think I'm missing something but somehow I can't figure. The appId and item 0 with prefix have the same numbers and display name is copied exactly from FB developer.
The strange issue I've noticed here is that when I first install app on device with FB account setup in settings, I can click it once...nothing happend and after second click the application is automatically disabled in Settings > Facebook.
UPDATE: I was able to login with native login dialog with older version of Facebook SDK (I've just replaced latest SDK with older one and now it works...don't forget to change permissions because latest SDK uses permissions public_profile instead of basic_profile used in older versions of SDK) why native login is not working with latest FB SDK is still a mistery :)
The answer to
'why native login is not working with latest FB SDK is still a
mystery'?
is here. See the upgrade guide form 3.13 > 3.14.
The default login behavior has changed from FBSessionLoginBehaviorUseSystemAccountIfPresent to FBSessionLoginBehaviorWithFallbackToWebView

iOS Facebook SDK 3.0 Login not redirecting to origin app

I recently updated my ios app to facebook sdk 3.0.
I did everything like describes here:
https://developers.facebook.com/docs/howtos/login-with-facebook-using-ios-sdk/
When I hit the Login with Facebook button everything works fine. The FB app is coming up, asks me for permissions BUT -> it doesn't redirect to come back to my app. It just stays with the FB app.
With the old SDK everything worked fine. Is it that the new SDK is not working with iOS 5?
I don't even know how to debug this...
Thanks for any kind of help!
UPDATE
It has something to do with my URL Schemes. Seems like ios SDK 3 doesn't like characters in the id. My former Scheme entry was fb0000000new where as the 0 are replaced by the app id. When I change that to just fb0000000 it works.
Would be good to have a link in the documentation though!
just try this its worked out for me
http://www.icodeblog.com/2011/03/28/facebook-sdk-posting-to-user-news-feed/

Launching a Facebook page from an iPhone app via QR code

I'm trying to create a QR code that launches a Facebook page from the app, rather than the browser on both Android and iOS.
Creating the code with fb://page/<page id>, works perfectly on an Android.
This was also supposed to work with iOS's Facebook app, but I think since Facebook updated their app recently from a HTML5 version to a fully native iOS app, that functionality has stopped working. It indeed opens the Facebook app, but it does not go to the page.
Has anyone else seen this happen since the app was updated a few weeks ago? And what string would I have to use to create a working QR Code for iOS's Facebook app?
We finally figured it out. FB changed it to fb://profile/ instead of "pages". It works across both platforms.

Titanium iOS - Facebook SSO not returning to App

I've recently added Facebook Single Sign On within my application using Appcelerator' Titanium. Which is working nicely but is failing to redirect back to my application automatically when presented with the "Already Authorized" facebook page.
If the user clicks the "Okay" button within facebook the Application re-opens and works as per usual. I'm just looking to get rid of that extra step for users.
Any suggestions? I've come across Objective C solutions such as : Does the Facebook iOS SDK require the user to authenticate every time they use the app?
Cheers,
Tom
I believe the issue was related to the Facebook App not being setup properly and not directly testing on a device instead of the simulator.
The following settings should be applied within you Facebook Application.
Enable : Native iOS App
iOS Bundle ID: com.yourcompany.yourapp
iPhone App Store ID: 24242423
Configured for iOS SSO: Enabled
Testing on the simulator will trigger Safari to open and show the Authorization dialog due to the Facebook App not being installed (hence why you need a real device). Pushing your app to the device and triggering the SSO within your application will then redirect back to your application if an error, already authorized or success occurs.
Hope this helps anyone that's had this occur.

Resources