How to log out of facebook sdk login when this error occurs? - ios

I just tried implementing the Facebook login to my app and when I went to log in I got the "App Not Setup: This app is still in development mode..etc" but the issue I am having is that I believe I entered the wrong email (not my admin) email but am stuck on this error page. Does anyone know how I can get back to the login page???
I have tried rerunning my app and I don't want to make my app public yet.

Is this in the simulator? Try deleting the app off the simulator and rebuilding/rereunning the app as that should present the login flow again and you can ensure you enter the proper email.

Related

Login Error using facebook-swift-sdk in ios

Im getting a login error every time I try to login to my application using the facebook sdk. So when the user gets to the home page they can choose to login with their facebook credentials. When they hit the facebook login button it brings up the user name and password screen, which they then type in their credentials and press done. Now here's the issue, well since it wasn't happening before, when they hit done facebook returns an error stating "LOGIN FAILED: You can't use facebook to log into this app or website because there's an issue with its implementation of Facebook login". I get this every time I try and login using the facebook sdk.
Im using FBSDKCoreKit, FBSDKLoginKit, FBSDKShareKit 4.41.0 and FacebookCore, FacebookLogin, FacebookShare 0.5.0 and Swift 4.0
EDIT ***.
Does anyone know how I can find the error being returned from the facebook login request. The issue is this error message that is showing is appearing in the facebook application before it returns to my application. SO I cant even see the error that is being returned. I checked the response in Xcode when the debugger continued and there is no error
EDIT 2:(In response to the first comment)
The application was already set up to use the facebook sdk and it was working fine. It just recently stopped working.
EDIT 3:
So I Ended up having to update the sdk to the newest versiom and replace the old apis with the new apis they created. So I changed everything out and here comes another problem. I try and login with an account I just created on facebook and it still gives me the same error. Yet, if I try and login with an account that has been previously logged into the application using facebook. I get a successful response and im able to continue on with the application. So I dont get why that new account isn't able to login? Is it because the account is too new?
I AM getting the same error as you. Facebook login has been working since the app was created. Now when I try and login after updating the Facebook SDK, I get no error only "Something is wrong with the implementation" what's weird is if someone has already logged in through facebook the facebook login works correctly.
This is because you haven't set up your app. go to https://developers.facebook.com -> My Apps -> add your app then follow the steps for login.
That should resolve it!

FB SDK redirecting me to different app after confirm login

I have 2 versions of same app in my iphone with different Bundle ID but same Fb APP ID.
Case-1 : When i try to log in through app-1, after confirm login, I get redirected to app-2 login page.
Case-2 : When i try to log in through app-2, after confirm login, everything works fine. I get redirected to same app.
Thanks for any kind of help!
Try following solution
This problem occurs due to same url scheme use for facebook login in app
You need set different URL scheme for both app .
Remove that app and check it will redirect correct application.

Facebook login error "User is not allowed to see the application."

Hi: I have submitted my app to the App Store. I have Facebook login feature in my app. When I try to login to Facebook from devices I have I am able to do it seamlessly. However Apple has rejected my app saying " When we tap the Facebook icon to sign up we are taken to mobile Safari where we receive a message that states :
User is not allowed to see the application.: The user is not allowed to see this application per the developer set configuration.
Not sure how will I be able recreate this issue. I installed my app on 3 different devices and was able to login without any errors. I checked my app setting on Facebook Status and Review section of Facebook and I have enabled my general public. Not sure what else I am missing. I just feel very dejected. Can anyone please help me figure this out? I am using parse as my backend service and logging users using parse Facebook login.
Thank you very much!
Another reason this will happen is if you are logged in as a test user from a different app than the one you are trying to sign in to. Facebook test users are app-specific.
Sign out of Facebook and back in with a test user from the correct app.
Go to Safari > http://m.facebook.com > logout
In cases where app sign in with safariviewcontroller, sometimes it contains test user of different app
In my case, I was using wrong facebook application id in the code. So added the correct id & it worked for me.
This issue occurs because Apple testers used the same Facebook test account which was created to test any other app and they did not logged out from that account(forgotten to log out) and that facebook test account doesn't have the permission for the current app in review which is why this issue occurs,
You can follow the given link to replicate the issue by creating an an test account.
http://samwize.com/2014/07/23/error-with-facebook-login-using-test-users/
Steps to create Facebook test account
https://developers.facebook.com/docs/apps/test-users#managetool
We had this problem, and it turned out that the problem app didn't have a namespace set up in the Settings > Basic tab. Creating one is the solution to this.
Recently I have faced this same issue. Presently Facebook doesn't allow you to login from any Facebook id as you app is in development mode. There are 3 possible solutions that work for me:
Use only that id for Facebook Log In Testing with which you are working in Facebook for developer.
In Facebook for Developer-> Login to your Account-> Open app->Roles-> Test Users-> Add->Submit-> Edit on newly created random tester account->"Change Name and Password for this Test User"-> Provide a Name and handy password for testing.->Submit.(Use the given random generated mail id and password for testing Facebook login through your app.
3)In Facebook for Developer-> Login to your Account-> Open app->Roles->Roles->Testers->Add Testers->Provide Facebook Id for the user you want to add as tester->Submit
To get Facebook Id for a valid user. Login to Facebook with the Id you want to make as facebook tester in your development process.Then goto profile and in URL of browser you see id=(some_random_number). Copy that Id and paste it into Add Tester section of Developer account. It will be in pending state until the valid user accept the inviation.
I had something similar when validating to apple too,
I still don't get it now but for some reason the facebook secret id had been erased from the parse configuration.
You must check that point too
I don't know if that was the reason or not but for me this happened only after I signed the application with a release key, so I made the app 'public'. Probably the test users doesn't work for public applications.
We had this problem, and the solution is to use the same FB test accounts that was created from the same FB App. So if the App get rejected from App, then you should send to Apple a FB test account with password.
my side
I was using wrong facebook application id in the code. So added the correct id & it worked for me.

Unity Facebook SDK - Strange FB.Login() Behavior in iOS App

I'm working on connecting an app to Facebook using the Facebook SDK for Unity. The process seems to be working fine except sometimes if a new user tries to use Facebook to login the FB.Login() doesn't ask them for permission to use their birthday and email.
Im using this call for the login:
FB.Login("email, user_birthday", AuthCallback);
and in the Facebook app dashboard, under permissions I added email and user birthday.
What seems to be happening is the first time the user goes to use the Facebook connect and hasn't ok'd the permissions on the login yet when they sign in a dialog pops up in the Facebook webview as them to authorize my app for "friends list and public profile" they hit ok and then my login process fails because I need access to the birthday and email. If they hit my login button again then the FB.Login() function runs again bringing up a second dialog asking for permission to use email and birthday, after they ok this my own login works fine. The other option is to hit the home button on the device reopen the app hit the Facebook connect button again and this time the authorization dialog has all four options "public profile, friends list, email, and birthday"
I followed the docs at https://developers.facebook.com/docs/unity/ for the connect process so I'm not sure where I went wrong.
Any insight into this would be helpful. Just unsure of where to continue looking I have exhausted most of my debugging avenues but I'm new to the Facebook scene, so it's possible i missed something.
Thanks for any help in advance.
EDIT** I'm using Facebook SDK version 4.2.1 and Unity 4.2.0f4

No longer able to login to iOS app via oauth: "the page requested was not found"

I've been unable to login to Facebook via oauth in my iOS app since yesterday (3rd July), instead I'm being redirected to a page stating "the page requested was not found". This is new behaviour - Usually I'd login through oauth from a webview (iOS 5.1) without a problem, however now upon attempting to log in I'm redirected to the following page: "The page you requested was not found, Back to previous page", redirected with the following URL- ttps://m.facebook.com/developers/login_error.php?app_id=id]&type=external&refid=9&_rdr
This only occurs for returning logins. If the user is authenticating for the first time, agreeing to permissions- in this instance (publish_stream,read_stream), the user can login successfully. If the user then logs out, and attempts to login again, they get the error.
It might be worth noting that the login screen has changed in style as well, to now say "Login to Facebook to connect it to…", while requesting either a username or a phone number, and no warning if the user enters an incorrect password or username. This differs from earlier behaviour in which the user was informed of an error on the login page.
This also affects the Facebook Hackbook sample application as well- I can't log into that either.
I've tested this with three fb accounts and It's the same behaviour with each. Is this a bug, or has something changed back end that's causing this behaviour?
Thanks- the app is waiting for review with Apple, so it's a bit troubling!
Edit: This looks like it's been raised with Facebook in the following bug reports, one by me, another by someone who beat me to the punch by an hour or so (someone at Facebook assigned):
https://developers.facebook.com/bugs/161181664017031?browse=search_4ff5a6a2bf1f51f27060269
https://developers.facebook.com/bugs/151046355019557?browse=search_4ff5a76b963853613233998
Mine's is the second of the two links; in the event mine isn't a duplicate, I'll leave it's status as new.
You can fix this by changing the App Type from "Web" to "Native/Desktop"
App Settings -> advanced-> Authentication-> App Type
Hope it helps.
I know the question is extremely old, but I had a similar issue which was gone after I did the following:
developers.facebook.com -> My Apps -> Choose (create) your app -> Status & Review -> turn on the switch
Perhaps it will help someone.

Resources