Need help in getting start FBML with c# MVC

Aug 12, 2010 at 9:26 AM
Edited Aug 12, 2010 at 10:40 AM

Dear all expert,

i am a newbie in facebook development.

i am trying to get start by Kevin Marshall's MVC sample. However, trobule getting as below.

my app is working fine without permission require [FacebookAuthorization(IsFbml = true, RequiredPermissions = "publish_stream,share_item")] as below

[FacebookAuthorization(IsFbml = true)]       //work fine

public ActionResult Index()
        {
            var api = this.GetApi();
            ViewData["userId"] = api.Session.UserId;

            return View();
        }

After adding the authorization attribute as mentioned above, i enconter an error

API Error Code: 102
API Error Description: Session key invalid or no longer valid
Error Message: Iframe dialogs must be called with a session key

 

May i know if anyone can give me an advice? (i found similar queries here but not solution to fix the problem)

I am using the 3.1 beta version SDK,MVC,FBML.

BTW,  the same permission required is work in my iFrame app. (i rather using Iframe than FBML if the iframe app can work in profile tab :P)

Aug 12, 2010 at 9:43 AM
Edited Aug 12, 2010 at 9:44 AM

Further, my FBML app migration setting as below:

Migrations

JSON Encoding Empty Arrays Disabled Properly encode empty JSON arrays as '[]' instead of '{}'
Stream post URL security Disabled Links in stream posts must go to the application's canvas or connect URL
Canvas Session Parameter Disabled Includes a 'session' parameter for canvas apps, which contains an OAuth token that can be used with the Graph API.
OAuth 2.0 for Canvas (beta) Disabled