Facebook not logging in on iOS

I integrated the FB SDK into my game but I can’t actually sign in. This is what I’m doing:

  • I click the login button in my game
  • Safari opens
  • I sign in with a test user
  • I get a notification in safari saying “You have already authorized gamename
  • I go back to my game and I’m not logged in.

Checking my debug logs in Xcode I’m getting the following error:

“The SFSafariViewController’s parent view controller was dismissed. This can happen if you are triggering login from a UIAlertController. Instead, make sure your top most view controller will not be prematurely dismissed”

I couldn’t find anything relating to Unity about this. Anyone know how I go about handling this? Thanks!

If it’s an actual bug then try reporting it to Facebook. They’re usually pretty good at responding.