iOS Facebook SDK 3.0 Login not redirecting to origin app - ios

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/

Related

Facebook Authentication: To use this URL you must add a valid native platform in your App's settings

Have a Cordova iOS app with Facebook authentication using Facebook Cordova Plugin.https://github.com/Wizcorp/phonegap-facebook-plugin
Was working fine but has suddenly authentication is failing, having not changed anything in the app that I can see. And I get a warning which I can't find on Google:
"To use this URL you must add a valid native platform in your App's settings."
The only thing I did yesterday really was add the app to iTunes Connect to use in Testflight. I have it registered as a web app still in Facebook. Could it somehow be related to that? That seems bizarre.
Well the answer was in the question. I added a native iOS app in Facebook. And it now works. Not sure why it was working and suddenly stopped, but hey that's Facebook.
I'll leave this answer here as there were zero hits on Google for that FB warning.

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

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.

Custom URL scheme for new Facebook iOS app

Does anyone know what the custom URL scheme is to open a Facebook page in their new iOS app. I was using fb://page/PAGE_ID however this doesn't seem to be working in the recently updated Facebook iOS app, it just opens the app but doesn't go to the required page.
I got this answer at developer.facebook.com:
Replace the word page with profile and it will work. Your new statement will be:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"fb://profile/247377102029332"]];
Use https://graph.facebook.com/YOUR_USERNAME to get your page ID.
In your iOS app use: fb://profile/[your ID] and the facebook app will open to your page.
The URL scheme for the iOS Facebook application is:
fb://profile/(fbid)
Same problem here. fb://page/PAGE_ID is not working anymore.
Note that fb://profile/(fbid) wasn't working properly on Facebook 4.x returning a "corrupted" page in both iPad and iPhone. Instead, fb://profile/(fbid)/wall in Facebook 4.x worked well when using an iPad but didn't work with an iPhone.
fb://page/PAGE_ID was the only option that worked on both iPhone and iPad, based on my experience.
I used to use http://wiki.akosma.com/IPhone_URL_Schemes as reference, but it's currently down...
A custom URL scheme is a mechanism through which third-party apps can communicate with each other. It doesn't allow you the provision to open a page in that particular application. It just fires an event to bring the called Application to the foreground. Going through this documentation would further clear your doubts.
The new Facebook app is built using Objective-C as against previous once in HTML5 which used to support URL scheme mechanism. This link gives a hint on that.
http://techcrunch.com/2012/08/23/facebook-for-ios-faster/

ios - integrating facebook with ios5 app

I'm trying to integrate facebook in my iOS 5 application.
As mentioned in facebook documentation, i'm doing everything as they mentioned.
Usually when facebook is initiated to authorize, it will take the user to browser opening facebook website and asks to authenticate. but in my case, it opens browser and immediately it goes back to the app. I didn't understand what's happening.
Here's the video of the issue that I'm facing
I noticed that if the facebook app is installed on iphone, above mentioned problem is noticed
Is your app ID on your project .plist?
Look at "Modify the app property list file" on the Facebook iOS tutorial

Resources