Facebook Developer Toolkit在授权后不会重定向

时间:2010-03-28 12:09:08

标签: asp.net-mvc facebook

我有一个基于样本http://blogs.claritycon.com/blogs/kevin_marshall/archive/2009/10/06/facebook-developer-toolkit-3-0-asp-net-mvc-sample.aspx

的小型facebook测试应用(iframe)
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会重定向到“索引”以进行身份​​验证。问题是,它永远不会重定向回“关于”。我在这里做错了什么?

0 个答案:

没有答案