Facebook Developer Toolkit doesn't redirect after authorization

Posted by Mika Kolari on Stack Overflow See other posts from Stack Overflow or by Mika Kolari
Published on 2010-03-28T12:09:08Z Indexed on 2010/03/28 12:13 UTC
Read the original article Hit count: 431

Filed under:
|

I have a small facebook test app (iframe) based on sample http://blogs.claritycon.com/blogs/kevin_marshall/archive/2009/10/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?

© Stack Overflow or respective owner

Related posts about facebook

Related posts about asp.net-mvc