3

I am testing an .NET MVC4 application using facebook OAuth services. When I use my facebook account (which I already authorized the application), I have no problem. But when I use my wife's account I am always redirected to the ExternalLoginFailure page.

The piece of code that redirects me to there is this:

AuthenticationResult result = OAuthWebSecurity.VerifyAuthentication(Url.Action("ExternalLoginCallback", new { ReturnUrl = returnUrl })); if (!result.IsSuccessful) { return RedirectToAction("ExternalLoginFailure"); }

result.IsSuccessful is always false but I don't know why.

I tried to use log4net to log info but no success. I tried to update OAuth assemblies but no success. I tried to use Glimpse but no sucess.

Any ideas ?

4

1 回答 1

1

您必须将其公开。去做这个:

  1. 登录https://developers.facebook.com
  2. 选择您的应用
  3. 单击设置并确保设置了联系电子邮件(如果没有,则无法完成第 4 步)
  4. 单击状态和审查
  5. Toggle '你想让这个应用程序及其所有实时功能向公众开放吗?' 转变

现在您可以从所有帐户访问该应用程序。

于 2014-07-31T20:12:43.217 回答