Project Description

This is a C# Facebook Library for the new Facebook Graph API, the new Graph API is a much simpler and better way to get information about Facebook objects. This library works for both Facebook Connect websites and Canvas iFrame applications.
This is based on the Official Python client library for the Facebook Platform with some additional methods to allow better integration with canvas pages.

Here is an example to illustrate the simplicity of using this api:

var args = FacebookGraphAPI.GetUserFromCookie(Request.Cookies, "YOUR_APP_ID", "YOUR_APP_SECRET");
var facebook = new FacebookGraphAPI(args["access_token"]);

//get my profile
var user = facebook.GetObject("me", null);
Response.Write(user["name"]);

//get my friends info
var friends = facebook.GetConnections("me", "friends", null);
foreach (var friend in friends["data"]) Response.Write(friend["name"]);

//post to my wall
var data = new Dictionary<string, string>();
data.Add("message", "testing facebook graph api");
var putobject = facebook.PutObject("me", "feed", data);

You can find more info in my web page of the C# Facebook Graph API Library

Last edited Oct 6, 2010 at 6:03 PM by amiune, version 5