Facebook Login Error iOS Application - iphone

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

Related

Parse iOS facebook login fails

I am using parse facebook login for new users of my app. Most users are able to use it without a problem and I have successfully tested all Facebook login scenarios. Some users, however, report that when they press the login button they see brief activity indicator and then nothing happens. In code, no error is registered but the user is not brought beyond the login page to the app's initial screen. The problem resolved if the user deletes the app from their Facebook app settings and then tries again. Has anyone else experienced this and/or found a solution? Thanks
Not sure if this ever got resolved for you.
There are multiple possible causes for this of course including your own code. However, we've seen a similar issue with 2 causes / solutions.
UX-wise we detect multiple failed logins (typically with no error code) and then pop a notification telling the user how to solve. Still digging for a code-level solution that'll solve either of these issues permanently (if you found one, please post!) but hope these help & let you know you're not crazy.
Issue #1: User is logged into multiple Facebook accounts from the same device (e.g. a primary account and an org or 2ndary account).
Fix #1: Have user log out of all Facebook instances (app, safari, iOS settings) and then log back in.
Issue #2: User has rejected Facebook permissions.
Fix #2: For iOS, make sure Your App is toggled on in Settings -> Facebook -> Your App

Facebook App Permission Getting Toggled Somehow

I have Facebook's SSO working properly in my iPhone app and most of my users have not been experiencing any issues. However, a small number of them have been reporting errors with Facebook Connect and not being able to create an account. After an email exchange with one, we determined that the app permission toggle under Settings->Facebook was somehow set to disallow my app from using Facebook.
I have since added an error message telling the user this might be the case but my question is how did this switch get toggled in the first place? It would seem that a user would have to manually toggle this switch, right? I also looked for an API method that might do this e.g. rejecting Facebook SSO the first time a user saw the dialog asking for permission; I could not find any such code.
Any ideas? I'm hoping this problem will solve itself with the error dialog I've put in but if possible, I'd like to remove this issue altogether.
As far as I know, using the native dialog with iOS6 and rejecting the permissions request (the first one, at least, not sure about requests which are asking an existing user for more permissions) will toggle that switch
If you need to debug, try uninstalling the app from your facebook profile (a HTTP DELETE request to /<USER ID>/permissions will do this, or you can do it in the facebook app settings), remove the iOS app, then install it and try to connect for 'the first time' again

Facebook ios sdk 3.0 active session FBiOSSDK error2

I am getting "com.facebook.FBiOSSK error 2" error when ever try to login with my app by using device.But its working fine with the simulator.
I am using iOs SDK 3.0 Beta. any solutions?
I had the same problem on authententication with "com.facebook.sdk error 2". And i think solved it on my part. Just make sure on your app definition on "https://developers.facebook.com/apps/.."
on "IOS Bundle ID " section, that you put your app id like this com.domainname.appName and not X792739.com.domainname.appName
Yes, after you see this error, if you go to Settings, you will see that the setting for this app is turned "OFF". But the problem in this case is that the user was never prompted to allow access -- i.e. the setting was turned to OFF automatically on first time access. If the user was asked, then of course that is understandable, but this is not the case (it's as if the SDK silently and automatically pressed Don't Allow for the user). That's why this is a problem.
Before you read any further, I want to note that once the setting is set, you cannot simply repeat the process to test it, because once the setting is set, it will never ask the user (even deleting and reinstalling the app does not help). To test this issue, you need to reset the permissions by going to Settings -> General -> Reset -> Reset Location & Privacy, before you can try to replicate this again.
From testing, I've discovered that if you have offline_access in the permissions you are requesting for the first time, then it will give this login error (and not prompt the user and set the permission to OFF). The SDK does not check and tell you that this permission is not allowed; it just fails to login.
We were seeing the com.facebook.sdk error 2 error only for certain people. The problem ended up being that our Facebook App was still in Sandbox Mode. Disabling that at developers.facebook.com/apps/{ourfacebookid} instantly fixed the problem.
Turns out it was working for those of us who were set up as admins for the FB App, but not anyone else.
This error is received when the user chooses "Don't Allow" when asked to give the app permissions.
I suggest that you replace the default error message (copied from Facebook SDK sample code) with a user friendly message, telling him to make sure he granted your app the required permissions.
To fix this at iOS 6, go to Settings -> Facebook and turn your app's switch ON.
I got the same problem when I tried to follow the tutorial (http://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/authenticate/)
It seems to work fine when I followed the instruction in the 'howto' section, and it's a little bit different : https://developers.facebook.com/docs/howtos/login-with-facebook-using-ios-sdk/
I faced with the same problem. It turns out that if the Sandbox is enabled than the users should be admin. If it is disabled then works for everyone.
In my case this error was the result of asking for 'publish_actions' permissions at authentication. Write permissions have to be gotten separately: https://developers.facebook.com/docs/tutorial/iossdk/upgrading-from-3.0-to-3.1/

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