c# : beginner tutorial getting friends list

Dec 31, 2009 at 5:51 PM

I am using VS2008 express and I would like to write a simple c# console application to get friends list. This forum and all the google searches are not helping me. Please provide me a very simple code sample to accomplish this. Here is what I have tried so far and I am stuck

 

 

            string APIKey = "fadf7c26c3e97562c4e0776052313284"; //ConfigurationManager.AppSettings["API_Key"];
            string APISecret = "fd808eb43dfe0a5f46a6b9e064d9075e";// ConfigurationManager.AppSettings["API_Secret"];
            Facebook.Session.ConnectSession connectsession = new Facebook.Session.ConnectSession(APIKey, APISecret);
            Facebook.Rest.Api api = new Facebook.Rest.Api(connectsession);
            IList<long> fd = api.Friends.Get();

            string APIKey = "xxxxxxx"; //ConfigurationManager.AppSettings["API_Key"];

            string APISecret = "xxxxxx";// ConfigurationManager.AppSettings["API_Secret"];

 

            Facebook.Session.ConnectSession connectsession = new Facebook.Session.ConnectSession(APIKey, APISecret);

            Facebook.Rest.Api api = new Facebook.Rest.Api(connectsession);

 

The following line is giving me error.

            IList<long> fd = api.Friends.Get();

 

I am unable to write a very simple c# console application. Please help !!!