开发者

Facebook Developer Toolkit doesn't redirect after authorization

I have a small facebook test app (iframe) based on sample http://blogs.claritycon.com/blogs/kevin_marshall/archive/2009/1开发者_运维技巧0/06/facebook-developer-toolkit-3-0-asp-net-mvc-sample.aspx

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();
    }
}

When I try to go to 'About' page, FacebookAuthorizationAttribute redirects to 'Index' for authentication. The problem is, it never redirects back to 'About'. What am I doing wrong here?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜