This is my last post on Twitter and Facebook integration into Sitefinity. I hope this series will save you time when you face the same task. When plugins and ready-made widgets are not enough, you can build fully custom Sitefinity modules and widgets on top of the Twitter and Facebook API.
Custom modules with the Twitter and Facebook API
Below are the libraries we reviewed. Each of them can be used inside a Sitefinity module or widget.
Twitter and Facebook API: Facebook libraries
Facebook JavaScript SDK
The JavaScript SDK gives access to the features of the Facebook Graph API and dialogs from JavaScript. It provides client-side functionality for authentication and for rendering the XFBML versions of social plugins. Main features:
- Core Methods (initialization, login, triggering Dialogs with Facebook as iframe dialogs or popups)
- Event Handling (subscribe to events, invoking callback function)
- XFBML Methods (Parse and render XFBML markup in the document )
- Data Access Utilities (Performs a parameterized FQL query)
- Canvas Methods (Starts or stops a timer which resizes iframe)
License: free.
Facebook Graph API for .NET (FacebookSharp)
The Graph API allows you to read and write objects and connections in the Facebook social graph. The FacebookSharp library supports work with:
- Work with user profile
- Work with application registered on Facebook Platform
- Work with Facebook pages
- Work with Facebook groups
- Work with photo albums and individual photo within an album
- Work with comment on a Graph API objects
- Work with Facebook events
- Work with Facebook friend lists
- Work with Statistics about applications, pages, or domain
- Work with shared links
- Work with messages in the new Facebook unified messaging system
- Work with Facebook notes, posts and user’s walls
- Work with individual video
License: free, source code available.
Facebook C# SDK
The Facebook C# SDK helps .NET developers build web, desktop, Silverlight and Windows Phone 7 applications that integrate with Facebook. Main features:
- NuGet Packages Available (Facebook, FacebookWeb, FacebookWebMvc)
- Compatible with all Graph API and REST API Calls
- Supports all forms of Facebook authentication: Cookies, OAuth 2.0, Signed Requests
- Samples Applications to get started quickly
- Client authentication tool to get test access tokens
License: free, source code available.
Twitter and Facebook API: Twitter libraries
Twitterizer
Twitterizer is a .NET library that provides access to most features of the Twitter API. Main features:
- Full OAuth compliance
- xAuth support
- Built-in caching
- High API coverage
- Search API support
License: free.
TweetSharp
TweetSharp is a .NET client library for communicating with Twitter. License: free.
Conclusion: when to use the Twitter and Facebook API
If Twitter and Facebook plugins or third-party modules cannot cover the required functionality, you can implement almost anything by developing custom Sitefinity modules and widgets based on the SDK libraries above.
Note: this article was written in February 2011. Many of these libraries are no longer maintained, and both APIs have changed significantly. Check the current Graph API documentation before starting a new integration.