socialcookbook
socialcookbook copied to clipboard
Logout
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
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", }))