public class HomeController : Controller
{
public ActionResult Index()
{
var api = this.GetApi();
var userId = api.Session.UserId;
return View();
}
// redirects to Index
// which doesn't redirect back here
[FacebookAuthorization(IsFbml = false)]
public ActionResult About()
{
var api = this.GetApi();
// goes here without FacebookAuthorization
// but userId = 0
var userId = api.Session.UserId;
return View();
}
}
当我尝试转到“关于”页面时,FacebookAuthorizationAttribute会重定向到“索引”以进行身份验证。问题是,它永远不会重定向回“关于”。我在这里做错了什么?