开发者

Facebook logout problem

I am using Facebook Login button in my website.

Visitors can log in via facebook successfully. FB login is working integrated with my own membership.

I mean I keep logs of FB logins.

The problem is here; User may log out from my site by clicking Logout button (开发者_运维问答my own logout button)

When they press the logout button, i redirect them to logout.php and run the following JS; "FB.logout()"

The JS code causes that user logout from their facebook account not my site.

If they login facebook on an another tab, and refresh my page they will log in again.

How can i end a session that user open via Facebook on my site?


You also have to clear facebook sessions from your machine with below code:

using Facebook;

Thread.Sleep(1000);    // delay is required to get it work

Facebook.Session.ConnectSession cn = new         Facebook.Session.ConnectSession(ConfigurationManager.AppSettings["APIKey"].ToString(), ConfigurationManager.AppSettings["Secret"].ToString());
cn.Logout();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜