Writing to facebook wall from asp.net getting invalid session key error.

Mar 17, 2010 at 11:52 PM

I like to write to my facebook wall on demand from my asp.net web application. I am using facebook api and getting invalid session error. Lot of guys must have done this. As I am new to it I am facing issue. The code is below. Please help me. I just created an application in facebook developer site and get the following keys. I am not convinced why they are required as it changes from application to application. If you guys have any sample pls send me .


using System.IO;
using facebook;
using facebook.web;
using facebook.Types;
using Microsoft.Xml.Schema.Linq;  
namespace SendTwittereWebApplication1
    public partial class _Default : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)

public void Post()


            facebook.API fbAPI = new API();
            fbAPI.ApplicationKey = "f8f6bc4fa0e0a83c495f69b3d867e6b0";
            fbAPI.Secret = "18bb2d6ff4c87a6856ab9a9464b3a304";
            string appLink = "http://www.google.com";
           // fbAPI.uid = 100000891091206;

            fbAPI.SessionKey = "B6C4E8";


string response = fbAPI.stream.publish("Hello World.");//,