Facebook Like Box for ASP.NET

Facebook Like Box is used to allow visitors of a website to add likes on Facebook page. It also shows people who like the page and messages posted on the wall of the page. Facebook Pages have become very important for any web business. If business is interesting for common public, it is very easy to collect numerous likes. Every like creates link back to page and increase search engine ranking. Links from Facebook page also bring additional visitors to website and increase authority of the site if the page has numerous fans, not just to search engine, but also to people who visit the website and see Like Box with lot of fans. Initial number of fans is also easy to collect just by asking friends to do it. The control is available in C# and VB.NET programming languages, as part of Facebook ASP.NET (C# and VB.NET) Control library.




facebook like box




Usage Examples:

Following examples show registration and insertion of Facebook Like Box ASP.NET control in ASPX file. The first example shows default Like Box with only PageId property set. The second example shows Like 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 Like Box inside ASP.NET page are highlighted.


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

Facebook Like Box with all properties set:
 <%@ Page MasterPageFile="~/Master.Master" AutoEventWireup="true" Inherits="FVK_Demo.LikeBox" %>
 <%@ Register TagPrefix="fvk" TagName="likebox" Src="~/FVK/LikeBox.ascx" %>
 <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Facebook Like Box for ASP.NET</title>
    <meta name="description" content="ASP.NET implementation of Facebook Like Box in C# and VB.NET" />
 </asp:Content>
 <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <fvk:likebox ID="Likebox1" runat="server" PageId="224341998463" 
       FansCount = "5"
       ShowHeader = "false"
       ShowStream = "false"
       Width = "500"
    />
 </asp:Content>




Configuration

Configuration of the Facebook Like Box ASP.NET control is done in ASPX page by setting optional properties. Default like box, without any property except PageId set, is shown on the first picture from the left. However, customizations are always possible with properties setting. If dynamic setting of properties is required, they can also be 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
PageId
String
Facebook Page ID.
facebook login button asp.net
Width
Int
Width of the like box in pixels. Default value is 300.
facebook login button asp.net
FansCount
Int
Number of fans to display. Default value is 10.
facebook login button asp.net
ShowStream
Bool
Set to true to show the massages from the Page Wall. Default value is true.
facebook login button asp.net
ShowHeader
Bool
Set to true to show the header. Default value is true.
 

Customer Testimonials

"We are using FVK to create Facebook games and applications on the .NET platform, taking advantage of the encapsulated behaviors (like Stream Publish, Invitation, Alert Publishing, etc.) included in the library. FVK has a real good cost-benefits relation, in comparision to develop our own Facebook .Net componentes and UI Controls. It's the best alternative for Facebook & C#."

Ignacio J. Raffa, CTO, Solotuweb

Customer Spotlight



Vote for your favorites

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