How to logout facebook c # sdk

I am writing one wp8 application that uses facebook C # sdk . Everything is going well, but one thing will not work (and it drives me crazy): I can’t get out of the system.

I tried:

var logoutParameters = new Dictionary<string, object>
                  {
                      { "next", loginUrl }
                  };
var logoutUrl = _facebookClient.GetLogoutUrl(logoutParameters);

and

var logoutUrl = fb.GetLogoutUrl(new {access_token = "...", next = "...." });

and

https://www.facebook.com/logout.php?next=[redirect_uri]&access_token=[access_token]

Sincerely.

+5
source share
2 answers

In WP8, you can clear cookies with WebBrowser.ClearCockiesAsync ()
Perhaps this link will help:
http://www.developer.nokia.com/Community/Wiki/Integrate_Facebook_to_Your_Windows_Phone_Application

+2
source

Replace loginUrlwith " http://www.facebook.com ":

Like this:

var logoutParameters = new Dictionary<string, object>
                  {
                      { "next", "http://www.facebook.com" }
                  };

var logoutUrl = _facebookClient.GetLogoutUrl(logoutParameters);
0
source

All Articles