DotNetOpenAuth请求扩展权限

时间:2014-02-12 10:34:37

标签: c# asp.net-mvc dotnetopenauth

我是DOTNetOpenAuth的新手,我想使用FacebookClient请求Facebook的扩展权限。我使用的是V 4.3.4.13329

我有以下代码

  var scope = new List<string>
              {
                  "email",
                  "status_update",
                  "share_item",
                  "publish_actions",
                  "user_friends",
                  "user_likes",
                  "user_status",
                  "friends_status"
              };

 var c = new FacebookClient(appId, appSecret, scope.ToArray());

 result =  c.VerifyAuthentication(ControllerContext.HttpContext, new Uri(uriString: Url.Action("ExternalLoginCallback", "Account", new{returnUrl = returnUrl}, "http")));

但是服务器总是返回错误的错误

[WebException:远程服务器返回错误:(400)错误请求。]    System.Net.WebClient.DownloadDataInternal(Uri地址,WebRequest和请求)+283    System.Net.WebClient.DownloadString(Uri地址)+100    DotNetOpenAuth.AspNet.Clients.FacebookClient.QueryAccessToken(Uri returnUrl,String authorizationCode)+235    DotNetOpenAuth.AspNet.Clients.OAuth2Client.VerifyAuthentication(HttpContextBase context,Uri returnPageUrl)+142

我有什么问题吗?

提前致谢

0 个答案:

没有答案