I am trying to add a function to exit the system that is called in the click event of ApplicationBarMenuItem, following the instructions in this blog
This is what my code looks like:
var oauth = new FacebookOAuthClient(); var logoutParameters = new Dictionary<string, object> { { "next", "http://www.facebook.com" } }; var logoutUrl = oauth.GetLogoutUrl(logoutParameters); LayoutRoot.Children.Add(FacebookLoginBrowser); FacebookLoginBrowser.Navigate(new Uri(logoutUrl.AbsoluteUri, UriKind.Absolute));
What I expected from this code is to logout the user from Facebook when the Navigated event completes and then displays any URL in the parameter (in this case facebook.com). However, I see that it always downloads β http://m.facebook.com/ β no matter what is transmitted and does not exit Facebook, I donβt care what it downloads after (it would be great, but for now I just want him to perform the logout action so that the user can log out and log in when he starts my application again). The only way I can successfully log out of the system is to understand when the page that they need to scroll down loads, zoom in and click "log out" manually at the bottom of the page, which is simply unacceptable to the user.
I also downloaded sample code from this blog and did about the same.
I saw this and this post , and the URL used is pretty close to what oath.GetLogoutUrl (logoutParameters) returns, but I tried to build the exact URL with the same result:
var logoutUrl = new Uri("https://www.facebook.com/logout.php?next=http://www.facebook.com&access_token="+fbClient.AccessToken);
This is definitely a cork for my application, so any help or suggestions anyone can provide will be greatly appreciated!
source share