[英]Facebook logout C# SDK
Hi 你好
I am having trouble trying to logout of facebook using the FB C# SDK. 我在使用FB C#SDK尝试注销facebook时遇到问题。
Here's a sample of my test 这是我的测试样本
var oauth = new FacebookOAuthClient();
oauth.AppId = fbSection.AppId;
string bbc = @"http://www.bbc.co.uk";
var logoutParameters = new Dictionary<string, object> {{ "next", bbc }} ;
this.NavigateUrl = oauth.GetLogoutUrl(logoutParameters).AbsoluteUri;
The problem is that it´s always redirecting to: 问题是它总是重定向到:
http://m.facebook.com/
I'm trying to redirect to an external site in this case bbc.co.uk, as in first case I tried redirecting to localhost and had the same problem. 我试图在这种情况下重定向到外部网站bbc.co.uk,因为在第一种情况下我尝试重定向到localhost并遇到了同样的问题。
I really wouldnt like to implement a javascript solution as I have already implemented my login functionality server side. 我真的不想实现一个javascript解决方案,因为我已经实现了我的登录功能服务器端。
Any suggestions much appreciated. 任何建议非常感谢。
After some time searching I came across this post: http://forum.developers.facebook.net/viewtopic.php?id=87109 经过一段时间的搜索,我发现了这篇文章: http : //forum.developers.facebook.net/viewtopic.php?id = 87109
which suggests to call: 建议打电话:
this.NavigateUrl = https://www.facebook.com/logout.php?next=[redirect_uri]&access_token=[access_token]
Which worked for me. 这对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.