Parse iOS Facebook Login when in production - ios

I implemented Facebook login a while ago in my app, using the Parse tutorial:
https://parse.com/tutorials/integrating-facebook-in-ios
It seemed to be working just fine, and I released my application to the app store. I then changed, on my Parse dashboard, the app from regular to "Production", and I was wondering if this could cause my Facebook login to stop working.
The actual error message on the phone, which occurs after a user presses the Login button, then after hitting accept for the basic facebook permissions, it brings up an error message:
Could it be the production switch, or is there something else wrong here?

I think there are just two things that should cause this error. First and most possible one is the one you thought of it, so switching to the production. And the second could be some similar setting on facebook developer site. You shoould check there if the settings there are in production environment. I know I dont give you anything specific but I'll for problem there if I'll have the same problem.

Related

iOS | Always logged in at the start of every new test

Not sure was this already asked here, but I could use help with an issue. I will provide any additional info if needed.
As said in the title, I would like to not be logged in after every test has been run, since I need to go through login test first. My colleague on Android just goes through her test, and does Driver.Quit/Dispose(); at the end, and she’s logged out for every other/next test after that.
On the other hand, for me (iOS), after I dispose of my driver - when the next test starts, I’m frequently (if not all the time) already logged in, and then I need to handle that case as well - and I’m trying to avoid it. I know that some login data is kept in the iOS keychain - and I can reproduce this issue manually with our app - if I uninstall the app, while being logged in - after I reinstall the app and start it - I’m already logged in.
Is there a way to handle this in a proper way? I’ve tried a lot of things, like actually logging out through the app, but that adds additional code, and makes it more complicated. Tried few additional capabilities - but nothing worked.
Note: It sounds like your app is keeping you logged in even with terminating/reinstalling the app. I would take a look closer and see if there's an issue attempting to log the user out when the app terminates or if there's a reason it's not coming to the login page after reinstalling.
I have code inside my iOS app that closes out the app if the app is terminated. And the below code works for me with appium as it terminates the app which also means it logs me out.
Try this to terminate your app:
const bundleId = "com.yourappsbundleid"
driver.terminateApp(bundleId)
Also note that appium's website provides more information and also ways to do this in other languages. See: https://appium.io/docs/en/commands/device/app/terminate-app/

How to do facebook login without opening a browser at all?

The IOS app I'm currently working on uses FBSDKLoginManager().logInWithReadPermissions, which opens a browser in the app for user to login to facebook. Then, the browser closes, and the app uses the FBSDKLoginManagerLoginResult to proceed.
However, I want to change it so that the app uses preset settings to log into facebook in the background, without actually opening a browser at all. To put it in a simpler way, the app should not open the browser, but still cause a regular log-in. Is that possible?
Just to clarify, this feature is only intended when the app is running in the developer mode, not for the users.
Thank you!
EDIT: I also found FBSDKLoginBehaviorSystemAccount, which
Attempts log in through the Facebook account currently signed in through
the device Settings.
However, I have no idea about how to implement this in swift, and I cannot find any resource online besides the brief description in FacebookSDK's documentation. It will be great if someone can help!

Parse iOS NSInternalInconsistencyException after User Logout and New User Login

I'm using the Parse iOS SDK and sporadically getting the NSInternalInconsistencyException 'User cannot be saved unless they have been authenticated via logIn or signUp'. I've read a lot about this error, and it seems to come up when apps try to save a ref to another user on the iOS side (instead of Cloud Code) or when apps try to modify an unautheticated user. I am attempting to do neither of these -- I'm able to trigger it when trying to save a string property of the logged in user. As I mentioned, this error occurs sporadically, so it's very difficult to track down, but I wanted to see if anyone had any suggestions.
When I change my [currentUser saveInTheBackground] calls to the synchronous [currentUser save] I do not seem to see this error. And to reiterate, it only occurs after signing out with one user and signing in with another, but does not occur with any type of consistency. If the crash the app and reopen, I'm able to save for that user.
I've found a similar threads around the web referencing a similar issue:
Parse SDK on iOS: 'NSInternalInconsistencyException', reason: 'User cannot be saved unless they have been authenticated via logIn or signUp'
https://groups.google.com/forum/#!topic/parse-developers/UZ1ywdpUFVQ
I'm using the iOS SDK 1.6.5 (this error also popped up on 1.6.3) and have parse localDataStore enabled.
Any help/suggestions would be greatly appreciated! Also, not sure if this is the right place to post -- please let me know if not. I tried the Parse Google Group a few days ago, but have not received any responses and am don't know if it's a bug, so decided the FB bugs site was not a good place to post.

Facebook login error: "The developers of this app have not set up this app properly for Facebook login"

I've been seeing error like this when trying to use Facebook Login.
I've checked everything including setting up the pList
and followed solutions in this link
The developers of this app have not set up this app properly for Facebook Login?
by setting the "
Do you want to make this app and all its live features available to the general public?" to YES
but then this image came up.
When I first try doing facebook login there's no need to even turn the live feature available to YES to make it work I wonder what went wrong.
Ok guys i found the solution, just go to facebook on your safari in the iOS simulator and log out the current user or test user and create a new test user. It should work!

Trigger.IO Facebook hasAuthorised always fails on iOS causing the user to have to re-login every time

Every time the user open my app, I call forge.facebook.hasAuthorized to check if the user is already logged-in, and has authorized my app; if that is the case, I automatically log him/her into the app otherwise, I take him/her to a facebook login page.
The expected behaviour is that if the user has the Facebook app installed, and has already authorized my app, forge.facebook.hasAuthorized will return true (as is the case on Android). For some reason forge.facebook.hasAuthorized always return false on iOS, resulting in the user having to login using Facebook every single time.
I started seeing this behaviour after expending the facebook permission I request the user to authorize.
This is clearly an unacceptable behaviour for apps, which results in a seginficnt decrease in user engagement. Anybody knows how to solve it?
Answering my own question just in case somebody made the same silly mistake.
I had trailing spaces if some of my permissions, for example "user_likes " instead of "user_likes". Turns out that for some reason this causes a really weird behaviour.

Resources