Https M Facebook Logout

Https M Facebook Logout



🛑 👉🏻👉🏻👉🏻 INFORMATION AVAILABLE CLICK HERE👈🏻👈🏻👈🏻

































Нажмите alt и / одновременно, чтобы открыть это меню

Sign up or log in to customize your list.
Join Stack Overflow to learn, share knowledge, and build your career.
Sign up with email Sign up Sign up with Google Sign up with GitHub Sign up with Facebook
Connect and share knowledge within a single location that is structured and easy to search.
I have an application that integrates with Facebook using Oauth 2.
I can authorize with FB and query their REST and Graph APIs perfectly well, but when I authorize an active browser session is created with FB. I can then log-out of my application just fine, but the session with FB persists, so if anyone else uses the browser they will see the previous users FB account (unless the previous user manually logs out of FB also).
This step opens a Facebook login/connect window if the user's browser doesn't already have an active FB session. Once they log-in to facebook they redirect to my site with a code I can exchange for an oauth token.
Now I have an Oauth Token, and the user's browser is logged into my site, and into FB.
Lets say my user wants to log out of my site. The FB terms and conditions demand that I perform Single Sign Off, so when the user logs out of my site, they also are logged out of Facebook. There are arguments that this is a bit daft, but I'm happy to comply if there is any way of actually achieving that.
A. I use the Javascript API to logout: FB.Connect.logout(). Well I tried using that, but it didn't work, and I'm not sure exactly how it could, as I don't use the Javascript API in any way on my site. The session isn't maintained or created by the Javascript API so I'm not sure how it's supposed to expire it either.
B. Use [LINK: facebook.com/logout.php]. This was suggested by an admin in the Facebook forums some time ago. The example given related to the old way of getting FB sessions (non-oauth) so I don't think I can apply it in my case.
C. Use the old REST api expireSession or revokeAuthorization. I tried both of these and while they do expire the Oauth token they don't invalidate the session that the browser is currently using so it has no effect, the user is not logged out of Facebook.
I'm really at a bit of a loose end, the Facebook documentation is patchy, ambiguous and pretty poor. The support on the forums is non-existant, at the moment I can't even log in to the facebook forum, and aside from that, their own FB Connect integration doesn't even work on the forum itself. Doesn't inspire much confidence.
Ta for any help you can offer. Derek
ps. Had to change HTTPS to LINK, not enough karma to post links which is probably fair enough.
2,42911 gold badge1919 silver badges2626 bronze badges
Sean's got a point, which you should listen to, because he's got more reputation than you, and that makes him right. If i'm logged into Facebook, then i come to your site, use it (or perhaps just decide to leave in abject disappointment), then log out, i'd be surprised and perhaps even a little outraged if i found i'd been logged out of Facebook too. If the UI made it clear that would happen, fine, but if it's just a button in the top-right corner of the page that says "Logout", maybe with a facebook logo kind of floating nearby, that's fairly surprising. Surprise is not a feature of good UI. – Tom Anderson Jan 10 '11 at 17:02
@DigitalPrecision: An excellent link, which goes to show that not even Facebook can get this right. – Tom Anderson Sep 21 '11 at 23:27
Agreed. We had to jump through hoops to get it to work within our application. Docs are horrid. – Mike Purcell Sep 29 '11 at 17:37
I have the exact opposite problem: When logging out of my selfmade app, I'm instantly logged out out of facebook too. – Sliq Dec 1 '13 at 4:45
I am having the same problem. I also login using oauth (I am using RubyOnRails), but for logout, I do it with JavaScript using a link like this:
This first calls the onclick function and performs a logout on facebook, and then the normal /logout function of my site is called.
Though I would prefer a serverside solution as well, but at least it does what I want, it logs me out on both sites.
I am also quite new to the Facebook integration stuff and played around the first time with it, but my general feeling is that the documentation is pretty spread all over the place with lots of outdated stuff.
10.8k33 gold badges2929 silver badges4646 bronze badges
3,59011 gold badge3535 silver badges4141 bronze badges
Thanks Christoph! I've tried that and it does indeed work. I had previously been trying to use FB.Connect.logout and FB.Connect.logoutAndRedirect, which I think are from an older version of the API. As you say the documentation if pretty fragmented. Just to add - prior to calling FB.logout I had to call FB.init as documented on the FB Javascript API page. Thanks for your help. – Derek Troy-West May 10 '10 at 10:58
Just up update, this solution doesn't work in Chrome (5.0.375 at least) on a mac. The user isn't logged out of FB, works fine in Safari and Firefox though.. – Derek Troy-West Jul 15 '10 at 23:44
My logout page had to do some FB login checking. The FB.logout() onclick did not complete fast enough before the redirection. I had to delay the redirection to ensure FB.logout() completes successfully first. – bcm Dec 1 '11 at 23:27
This works as of now - and is documented on facebook's site @ http://developers.facebook.com/docs/authentication/. Not sure how recently it was added to the documentation, pretty sure it wasn't there when I checked Feb-2012
You can programmatically log the user our of Facebook by redirecting the user to
8,12966 gold badges3636 silver badges4848 bronze badges
Can't get this to work. Using server side connect method. Also, if once the documentation link pointed to this method, it doesn't anymore. – Daniel Gerson Nov 29 '12 at 17:16
@DanielGerson when you use ssc you will get the access token as response from facebook. It will work when you send the access token to the client, so that the client can used it in the logout link. – Reiner Nov 14 '17 at 8:04
This solution no longer works with FaceBook's current API (seems it was unintended to begin with)
Try to give this link on you signout link or button where "yoursitename.com" is where u want to redirect back after signout may be ur home page.
1,90933 gold badges1919 silver badges3232 bronze badges
21322 silver badges22 bronze badges
Sumit, thank-you. That works perfectly. I'm not entirely sure why the mobile version of facebook lets you log-out like that while the other doesn't but I don't care. It's better than the jscript hack I'm using at the moment, and easier than the main facebook logout + session key described around here as well. – Derek Troy-West Jul 29 '10 at 10:52
But what if the user doesn't want their facebook session to be destroyed? What if they were already logged into face book, then log into your site, then log out of your site, then go back to facebook and don't understand why they've just been logged out? This doesn't seem like the perfect solution... – Sean Sep 3 '10 at 14:24
When this question was asked a few months ago, single sign out was a requirement of the facebook terms and conditions. I'm not sure if it still is, and I don't disagree with you, but at the time it was required. – Derek Troy-West Feb 7 '11 at 14:30
see my solution below for something that works as of now, and is documented by facebook – russau Apr 12 '12 at 22:30
I can programmatically log user out Facebook by redirecting user to
The URL supplied in the next parameter must be a URL with the same base domain as your application as defined in your app's settings.
121k8080 gold badges378378 silver badges319319 bronze badges
35611 gold badge44 silver badges1111 bronze badges
You can do this with the access_token:
You can use that $session key in the PHP SDK to generate a functional logout URL.
This ends the browser's facebook session.
1,90933 gold badges1919 silver badges3232 bronze badges
31022 silver badges88 bronze badges
you don't need to work with token manually due to $facebook already has it. – zerkms May 31 '10 at 12:06
Could you explain what you mean in more detail? This method is the only one I've found to log the user out and end the FB session without using javascript – Zach Greenberger May 31 '10 at 13:12
Bob, here's the structure of the logout URL: facebook.com/…> Where session_key is the middle part of the access token as I described above. – Zach Greenberger May 31 '10 at 13:15
As @Amir pointed out, the session key is the same as the "code" you received from Facebook during the inintial OAuth authorization. Better to use that one than to try to parse the access token (since the format of the token could change). – Anders Fjeldstad Jul 16 '10 at 11:10
Using the same method Zach used. Here is how to do a complete logout in RoR + Devise + Omniauth github.com/intridea/omniauth/wiki/… – Dex Mar 1 '11 at 9:43
Works and is nice and easy am just trying to find a logout button graphic now!
28944 silver badges33 bronze badges
Here's an alternative to the accepted answer that works in the current (2.12) version of the API.
2,78011 gold badge1919 silver badges3636 bronze badges
the mobile solution suggested by Sumit works perfectly for AS3 Air:
html.location = "http://m.facebook.com/logout.php?confirm=1&next=http://yoursitename.com"
1,5181313 silver badges1515 bronze badges
At the moment I'm writing this, the trick with m.facebook.com no longer works (at least for me) and user is redirected to the mobile FB login page which obviously is not good for UX.
Fortunately, FB PHP SDK has a semi-documented solution (in case the link doesn't lead to getLogoutUrl() function, just search look for it on that page). This is also mentioned in at least one other on StackOverflow: Facebook php SDK getLogoutUrl() problem.
BTW I've just noticed that Zach Greenberg got it right in this question, but I'm adding my answer as a summary for Python developers.
15.2k77 gold badges5252 silver badges7272 bronze badges
A note for Christoph's answer: Facebook Oauth Logout The logout function requires a callback function to be specified and will fail without it, at least on Firefox. Chrome works without the callback.
44955 silver badges1717 bronze badges
@Christoph: just adding someting . i dont think so this is a correct way.to logout at both places at the same time.(Logout).
74155 silver badges66 bronze badges
Update: This solution works and just a call to 'FB.logout()' doesn't work because browser wants a user interaction to actually call this function, so that it knows - it is a user not a script.
2,56233 gold badges1818 silver badges3535 bronze badges
it's simple just type : $facebook->setSession(null); for logout
Highly active question. Earn 10 reputation in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.
Lead React Native Developer with React Web Skills
4 - REACT Developer for a virtual team
GLOBAL APPCASTING ABNo office location
Front-end Web Developer for Climate
Climate Central, Inc.No office location
AWS IoT Developer Greengress .Net Python NodeJS
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.3.9.38752

Facebook Help Center | Facebook
Log into Facebook
Facebook Oauth Logout - Stack Overflow
FACEBOOK | UNFORTUNATELY LOGOUT | PROBLEM SOLVED 2020 - YouTube
Facebook (@facebook) • Фото и видео в Instagram
Mercy Gangbang
Baber Nude
Brit Morgan Naked
Https M Facebook Logout

Report Page