SSO login dialog returns to fbDidNotLogin with no indication of error - iphone

I have recently created a new Facebook app ID as I'm adding Facebook SSO integration into my app. My app within Facebook is set to Native iOS and I've included the Bundle ID and a current published app's Apple ID (for testing).
I've implemented the SDK as per the instructions (I have two other iOS apps currently using the SDK without issue as well). All delegate methods and required plist entries are in place for the URL callbacks.
After attempting a login I'm shown the Facebook white screen (just a loading spinner) with blue bar but after 5 seconds it redirects back to my app and hits the fbDidNotLogin delegate method. That method doesn't include any sort of retrievable error (at least none that is documented or available to me).
So at this point I'm at a loss for what might be causing my login to fail. Is there any way to get a more detailed error? Or has anybody else run into this same problem?

I had the same issue. Solved this by changing two items in the Facebook app settings:
Configured for iOS SSO set to enabled
Updated the iOS Bundle ID so that it matched by bundle ID exactly (previously the casing was different)
Not sure which item fixed it, I largely suspect the first...but worth checking both.

Make sure your device's time and date settings are correct. I had this happen to me when I recharged and turned on an iPod whose battery had died. The date and time were totally wrong, and when I set them to what they were supposed to be, I got the Facebook login dialog just fine.

Related

facebook-unity-sdk not working on iOS (facebook-unity-sdk)

I am using Unity Facebook SDK 5.1 and Unity version is 4.3.0.
I am testing on iPhone 4 device which don't have facebook app installed.
I have integrated SDK inside my game.
When i try to login into facebook using my app first it opens the FB login page inside browser,after login it ask me for authorization when i press "Ok" it takes me to my app.
Inside LoginCallBack method i got the following response
FBResult.Text =
{"is_logged_in":false,"user_id":"","access_token":"NOT_USED_ON_IOS_FACEBOOK","access_token_expires_at":"01/01/0001 00:00:00"} .
Many Thanks
Sachet
Make sure that your URLSchemeSuffix in your Info.plist is correct (fb[appid]) and that the handleOpenURL call (in your generated XCode project) is making it back to facebook.
I had the very same problem where another plugin was capturing the handleOpenURL call when i was returning from facebook after authorizing the app and it was preventing the handleOpenURL response from making it all the way back to the facebook plugin.
You can test it by putting a breakpoint in the Facebook/FbUnityInterface.mm file #
- (BOOL)openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication
If this isn't being hit, it's likely another openURL handler is getting the response first and not handing it back to super.
I got the same error but for different reasons using iOS native login.
I checked the URLScheme, add some breakpoints in the different OpenUrl but got nothing. Turns out I was logging with the "publish_actions" permissions. The message meant that this was not supported by iOS native implementation I suppose.
I regret the message not being helpful but you should pay attention to the requested permissions at login and ask them later using the graph API.
Hope that will help people having the same issue.
I got the same error. Reason was in incorrect bundle id (we used different bundle ids for release and development builds). Then we added this bundle id to Facebook App's Settings page, and the error gone.

SLComposeViewController addURL issues iOS7

I have a standard facebook and twitter SLComposer that brings up a small saying and also attaches a link to the app on the message using the addURL: function. I'm testing it in iOS7 and whenever I brink up the composer I am immediately taken out of the app and to the attached link address (which in this case is the app store). It's only doing this in iOS7. 6 and under works just like before. Any Thoughts?
Try add image for share for preview of the url destination.
If SLComposeViewController doesn't have image for preview, it tries to get image from the URL of destination server.
In my project I've found redirection on server to AppStore from my server.
I'm seeing something similar, but only when adding URLs that redirect to the app store, such as bitly links. Regular links outside the App Store work just fine as do App Store links that are direct (e.g. do not redirect). Does this sound right? I think it's a bug in Apple's plumbing for catching loaded App Store URLs iOS wide...
The URL is fully loaded to generate the preview image that you see in the tweet/facebook. Reported as rdar://15228808.
The behavior of how the Social Framework works was changed in iOS 7. In iOS 6 my app would just show a dialog for posting to either Facebook or Twitter regardless of whether my device/simulator had an account setup with the respective service. In iOS 7 it will only show if I have an account setup. I think this is based on the method "isAvailableForServiceType:". Without seeing your code, I can't be sure this is your issue, but my guess is that it might be.

Facebook Login Error iOS Application

My iOS application allows me to login using my own facebook account successfully. But when I send it on test flight to a friend, the app downloads but when he presses connect to Facebook (which works on my simulator and personal device), it won't let him log in. Doesn't even give him the option to, just spits out an error (com.facebook.sdk error 2). What am I missing? What would cause it to work for me, but not for others? I'm just looking for a general answer here because I followed all the facebook tutorials and I can't imagine what kind of thing could be going wrong.
I just figured out the problem. Should have been SUPER obvious, but being new to development I didn't realize I needed to change the sandbox setting to disabled in order to allow others to access facebook through my app.
This error pops up when your app is not authenticated properly.
You need to keep your BundleId the same at all places.
Change your bundleId in the app that you have registered on Facebook as com.asdad.casd instead of < teamId >.com.asdad.casd

iOS app misconfigured for Facebook integration

I am using the facebook-iphone-sdk framework to integrate my iPhone app to FB. The problem is when I click the button it gives an error "The application you are using is misconfigured for the Facebook integration. Please download the latest version of the app."
I was able to connect with FB only once. For the first time it worked fine and I was also able to post some data into my wall but afterwords it not working, and the above error occurs.
What could I be doing wrong?
The Bundle ID is case sensitive so watch out for that.
e.g. com.myapp.MyApp is not the same as com.myapp.myapp
This happened to me and gave the same error message.
May be you are using the deprecated API of facebook... Please use the New FBGraph API for facebook integration ....
How to share or post by mail, twitter and facebook from the current application?
This is not only about email... here you will find the tutorial and sample code for facebook integration.....!!
Possible Solutions:
1) Double Check that you are putting in the right facebook app id in your code, and that you didnt somehow overwrite that when you made it work the first time.
2) Check that in the facebook developer profile you have all the proper things set up (They have decent doc's for how to set up properly).
3) Check that you are using the most up to date version of the SDK for fb.
4) Consider using the built-in Facebook for iOS6, since you probably wont be releasing your app before iOS 6 comes out anyways.
5) If all else fails, start over and go through the instructions from beginning to end. Check and re-check everything you set up and carefully scan for little typos or something. It's probably a minor mistake somewhere that you're overlooking.
6) Post code if you want more specific help. An error message isnt enough to deduce what your problem is.
Just delete you app from facebook dashboard, create it again, and then change the facebookID in you App-Info.plist, in the key FacebookAppId and URL types array key. I did it and my app works fine.
Delete facebook app, force perform login in safari..

iOS and Facebook Graph API: Inconsistent authorize issues

I'm using the official FBConnect library for iOS and trying to get it working in my iPad app. Here's what's strange: when my friend logs in using the call to authorize:permissions:delegate, everything works fine: the dialog asks for his authorization to connect to Facebook, the fbDidLogin delegate method gets called, all is well.
However, when I try to login, the dialog never changes. The keyboard is dismissed, the password field is cleared and it just sits there. The issue is the same in both the simulator and on the device.
Here are the things I've checked and triple checked:
My login name and password are correct. If I do put in the wrong password, an "invalid username/password" message appears, and that isn't happening.
The application is not in sandbox mode.
The Application ID is correct (my friend can login without problems).
Some additional information:
Original application was created by my friend.
I created a second FB app and put in the new Application ID
My friend can login with the new Application ID
I can log in to neither.
This appears to suggest that there is something different about my friend's account, rather than the app itself.
We've been banging our heads together on this for a couple of days now. What could be causing this behaviour? Why isn't an error being generated?
Edit: It seems there are a lot of people affected by this, so in the interest of trying to find an answer, I've added a bounty.
There appears to be a server-side problem with Facebook logins as noted here:
http://github.com/facebook/facebook-ios-sdk/issues#issue/95
People have said that if they change their password on Facebook they are subsequently able to log in using the Facebook-iOS-SDK downloaded from github. Obviously that is a poor long-term solution and would be unacceptable in an app released through the App Store. On the bright side, there seem to be reports of similar login problems logging in from apps on other platforms as well.
Update: Facebook has a bug filed on this subject that can be viewed here:
http://bugs.developers.facebook.net/show_bug.cgi?id=13199