Delete facebook session cookie from my application on users logout

后端 未结 9 1319
耶瑟儿~
耶瑟儿~ 2020-12-11 06:40

I am working in an application which is using facebook connect to log in the users using their facebook account.

Everything works fine except in the following case:<

9条回答
  •  心在旅途
    2020-12-11 07:05

    I was having trouble with this too, and contrary to Efazati's answer, my trouble was with cookies set on my own domain by the Facebook php api library. The thing that I was overlooking was when deleting the cookie, using the exact domain and path that the cookie was set with. This is the line that successfully deleted the cookie for me.

    setcookie("fbs_" . $app_id, '', time()-3600, "/", ".mydomain.com");
    

    tgriesser's comment was also helpful.

提交回复
热议问题