1

I know that this question has already been asked here, but nothing works for me. I can't logout from Facebook. No matter what I do I still see "You have already authorized AppName" screen.

I tried:

[[PFFacebookUtils facebookLoginManager] logOut];

which nullifies the current access token but no luck.

I tried deleting permissions but it does not work as well. Once permissions are deleted then it just asks user for permissions but it asks the same user.

I tried just:

[PFUser logout];

but still nothing.

Any ideas, guys?

Andrey Chernukha
  • 21,488
  • 17
  • 97
  • 161
  • When you user [PFUser logout], what happens? – Dan Levy Mar 27 '16 at 15:05
  • PFUser gets logged out, that's it. – Andrey Chernukha Mar 27 '16 at 15:09
  • Your question asks why you can't logout from Facebook in your app...what do you want to happen after the user is logged out? – Dan Levy Mar 27 '16 at 15:16
  • I want to be able to login with a different Facebook user. But I can't. I see a screen (it is SFSafariViewController as I understand) which says "You have already authorised AppName". But I want to see the login form so a new user could login – Andrey Chernukha Mar 27 '16 at 15:18
  • On the safari window, you will have to log out that Facebook user and login as a new Facebook user. – Dan Levy Mar 27 '16 at 15:20
  • there's no logout option on that screen – Andrey Chernukha Mar 27 '16 at 15:22
  • My mistake, you are right. I looks like you have to go to Facebook.com in the Safari app and login as a new user there. Let me know if this works and I will post it as an answer. – Dan Levy Mar 27 '16 at 15:24
  • it does not work. I've logged into the app with a Facebook user, but I'm logged out in Safari app – Andrey Chernukha Mar 27 '16 at 15:30
  • I can be signed in with user A through SFSafariViewController into my app and be signed in with user B in the Safari app. They do not touch each other at all – Andrey Chernukha Mar 27 '16 at 15:32
  • For my app, I use PFFacebookUtils also. I just tried it on my device. I logged out from my Facebook account in the Safari app and went back into my app. I went to log in with Facebook and it asks me to log in first. Make sure you are logged out in the safari app. – Dan Levy Mar 27 '16 at 15:34
  • yes, you're right. it works. yet, isn't there a way to do that programmatically? I can't believe it. It is so important and it's missing. And there's logOut method on FBSDKLoginmanager which doesn't work. so weird... – Andrey Chernukha Mar 27 '16 at 15:40
  • Thanks a lot for your help, buddy. please post your solution as an aswer so I could at least upvote it. You deserve some more reputation. – Andrey Chernukha Mar 27 '16 at 15:46
  • Yeah, I know what you mean...maybe in the future! Please mark the answer that I posted – Dan Levy Mar 27 '16 at 15:47
  • I've upvoted your answer, but I don't want to mark it as accepted by now. There's a little hope for magician who will tell me how to do that programmatically. I'll accept your answer tomorrow if no such magician emerges by that time – Andrey Chernukha Mar 27 '16 at 15:51
  • Sounds good...thanks! – Dan Levy Mar 27 '16 at 15:52
  • The same applies to your answer to my question about sign up/log in. If nobody gives better answer tomorrow I'll accept it – Andrey Chernukha Mar 27 '16 at 15:52
  • is there any chance you can help with this: http://stackoverflow.com/questions/36224389/pffacebookutils-login-methods-do-nothing-if-facebook-app-is-installed ? – Andrey Chernukha Mar 27 '16 at 15:55
  • Unfortunately, I cannot – Dan Levy Mar 27 '16 at 22:33

1 Answers1

1

The user will have to go into the Safari app and log out there.

Dan Levy
  • 3,931
  • 4
  • 28
  • 48