socialcookbook icon indicating copy to clipboard operation
socialcookbook copied to clipboard

Logout

Open eljeffeg opened this issue 12 years ago • 1 comments

The new Facebook App requirements specify that a logout method is necessary. Any chance of adding this to the cookbook example? Whenever I try the logout methods FB.logout(), it seems to auto log me back in. Thanks

eljeffeg avatar May 13 '12 14:05 eljeffeg

The only way I've gotten it to work is to do this:

class LogoutHandler(BaseHandler): @tornado.web.asynchronous def get(self): self.set_secure_cookie("uid", "") redirect_uri = "http://" + self.request.host user = self.current_user; access_token = user["access_token"] self.redirect("https://www.facebook.com/logout.php?" + urllib.urlencode({ "access_token": access_token, "next": redirect_uri, "confirm": "1", }))

eljeffeg avatar Jun 01 '12 15:06 eljeffeg