views:

176

answers:

0

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?