Connect from the console app.

Jul 28, 2010 at 12:53 AM



I'm trying to connect to Facebook with C# console application. 


I digged few examples but it does not work. 


Could you please help? 


what Am I doing wrong?


Can you please help? I'm using 3.01 API

   class Program
        private const string apikey = "MY_API_kEY";
        private const string apisecret = "Application_Secret";

        static void Main(string[] args)
            Facebook.Session.ConnectSession _fbsession = new Facebook.Session.ConnectSession(apikey,apisecret);
            Facebook.Rest.Api api = new Facebook.Rest.Api(_fbsession);

            if (!_fbsession .IsConnected())
                Console.WriteLine("Not Connected ");


Jul 28, 2010 at 5:15 PM
I might be wrong, but I don't think you can Login() from a console app. Use an infinite session key associated with the offline_access extended permission or just use api calls and fql that don't require a session.