LINQ to FQL is an open source project, sources, binaries and samples can be found at CodePlex. This library extends the Facebook Developer Toolkit.
Introduction
This library enables developers to use LINQ (.NET Language-Integrated Query) with Facebook instead of string based FQL queries. The main benefits for using this library are:
- Type safety: queries are now typed and their syntax is verified during compilation.
- Auto-complete now function when composing queries in Visual Studio.
- Using Facebook / anonymous objects for query results.
Example: this following sample code retrieves the names and pictures of all of your friends.
var db = new FacebookDataContext(); var friendIDs = from friend in db.friend_info where friend.uid1 == db.uid select friend.uid2; var friendDetails = from user in db.user where friendIDs.Contains(user.uid) select new { Name = user.name, Picture = user.pic_small };
Via CodeProject: LINQ to FQL (Facebook Query Language). Free source code and programming help