I’m new to the Facebook C# SDK provided by Microsoft. I noticed that the API contains 3 namspaces: Facebook, Facebook.Web, and Facebook.Web.Mvc. What’s the difference and uses for the namespaces?
In addition, if I want to use .NET Framework 2.0 to get a list of friends in my app, how would I do that using C# SDK?
Thanks in advance.
The Facebook C# SDK is an evolution of the old Facebook Developer Toolkit. It does not work with 2.0. You can download the Facebook Developer Toolkit which did work with 2.0. Current SDK works well with 3.5 and 4.0.
http://facebooktoolkit.codeplex.com/
You can find samples at http://facebooktoolkit.codeplex.com/releases/view/39727
Namespaces
Facebook has one member which contains for example the FacebookClient class, which provides access to the Facebook Platform. FacebookApiException which handles errors between you app and the api. FacebookOAuthClient which represents the OAuth client, etc.
Facebook.Web contains the FacebookSession class which represents a facebook session, and the FacebookSignedRequest class which represents a facebook signed request. CanvasAuthorizer, CanvasUrlBuilder, FacebookWebClient, FacebookWebContext, etc.
Facebook.Web.Mvc contains the CanvasAuthorizeAttribute class, the CanvasUrlExtensions class, etc. And many more classes.
The use of namespaces depends on the classes you need to use.
I recomend clicking on View, inside Visual Studio, and opening the Object Browser. There, you can browse the namespaces and classes and methods. All with descriptions and examples of use.