Facebook Fan Box for ASP.NET

Facebook Fan Box is older version of Facebook Like Box. However, it is still used on numerous websites and Facebook applications. It is used to provide an easy way for people to because fans of Facebook Page or Facebook application. Having a lot of fans increases rating of Facebook pages and applications in eyes of people, and also for search engines. Link back from popular Facebook page or Facebook application page also increases rating of website to where it points and increases number of visitors from link directly, and from search engine. Facebook Fan Box also has options to define number of displayed fans and messages from page stream.

Facebook Fan Box ASP.NET control provides easy integration of this feature in ASP.NET pages and setting options dynamically from code behind in C# and VB.NET. The control is wrapper around XFBML tag and it also has verification if all parameters are correctly set. In case of typing error, exception is thrown, and the error is immediately seen by developer. Compiled version and source code version of this ASP.NET control are available in C# and VB.NET programming languages, as part of Facebook ASP.NET (C# and VB.NET) Control library.






Facebook Fan Box ASP.NET control has a demo page inside Demo Website that shows how it works. The most important fact is that the Demo website is contained in the package with the library, which is very useful resource for code examples, in both C# and VB.NET, for each control from the library. Look at the Facebook Fan Box demo



Configuration

Configuration of the Facebook Fan Box ASP.NET control is done in ASPX page by setting optional properties. Id of Facebook page or application is automatically taken from web.config file. Default Fan Box, without any property set, is shown on the first picture from the left. The control with ShowStream and ConnectionsCount properties set is shown on right. If dynamic setting of properties is required, they can be also set in the code behind, for example on Page_Load method. Following table shows the list of all properties with their types and descriptions.


Properties:
facebook login button asp.net
Property Name
Type
Description
facebook login button asp.net
Width
Int
Width of the control in pixels. Default is 300.
facebook login button asp.net
ShowStream
Bool
Set to true if you want to show stream messages from Facebook page. Default is false.
facebook login button asp.net
ConnectionsCount
Int
Number of fans to display. Default is 0.
facebook login button asp.net
CssUrl
String
Url of custom defined CSS file.




Usage Examples:

Following examples show registration and insertion of Facebook Fan Box ASP.NET control in ASPX file. The first example shows default Fan Box, without properties being set. The second example shows Fan Box control with all properties set. Examples of ASPX files show only the code required for registration and integration of ASP.NET control in a web page. To see all requirements for registered components, including JavaScript, CSS style and header setting, please look at the manual for page requirements. For following examples, all page requirements are placed in ASP.NET master page. Important parts for registration and integration of Facebook Invite Friends control inside ASP.NET page are highlighted.


Default Facebook Fan Box:
 <%@ Page MasterPageFile="~/Master.Master" AutoEventWireup="true" Inherits="FVK_Demo.LikeBox" %>
 <%@ Register TagPrefix="fvk" TagName="becomefan" Src="~/FVK/BecomeFan.ascx" %>
 <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Facebook Fan Box for ASP.NET</title>
    <meta name="description" content="ASP.NET implementation of Facebook Fan Box in C# and VB.NET" />
 </asp:Content>
 <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <fvk:becomefan ID="becomefan1" runat="server" />
 </asp:Content>

Facebook Fan Box with all properties set:
 <%@ Page MasterPageFile="~/Master.Master" AutoEventWireup="true" Inherits="FVK_Demo.LikeBox" %>
 <%@ Register TagPrefix="fvk" TagName="becomefan" Src="~/FVK/BecomeFan.ascx" %>
 <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Facebook Fan Box for ASP.NET</title>
    <meta name="description" content="ASP.NET implementation of Facebook Fan Box in C# and VB.NET" />
 </asp:Content>
 <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <fvk:becomefan ID="becomefan1" runat="server" 
      ConnectionsCount = "10"
      CssUrl = "http://mydomain/mycss.css"
      ShowStream = "true"
      Width = "400"
    />
 </asp:Content>

 

Customer Testimonials

"The Facebook Visual Kit is a great piece of software. It provides a hassle-free wrapper around a number of Facebook controls, leaving you to get on with the development without having to endlessly trawl through Google for help! The best part about the FVK though, is the outstanding level of support. No quibbles, just great support!"

Mark Brassington, Black Halo Games

Customer Spotlight



Vote for your favorites

Facebook development platform
Contact   |  Refund Policy   |  Privacy Policy   |  EULA