Facebook Request Dialog for ASP.NETFacebook Request Dialog is new Facebook component used for inviting friends to start using Facebook application or Facebook Connect website, and for requesting particular action from friends who already use the application. Facebook Request Dialog ASP.NET control allows easy integration of Facebook Request Dialog in ASP.NET pages and dynamic configuration from the code behind and data sources. The control is wrapper around Facebook JavaScript methods, 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. The control can be used in 3 ways, i.e. in 3 different forms: as a link or a button which have to be pressed to open the request dialog, or to be automatically opened on page load. The control is available in C# and VB.NET programming languages, as part of Facebook ASP.NET (C# and VB.NET) Control library.
![]() Usage Examples:Following examples show registration and insertion of Facebook Request Dialog ASP.NET control in ASPX file. The first example shows default Request Dialog with only Message property set. The second example shows Request Dialog 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 Request Dialog inside ASP.NET page are highlighted. Default Facebook Request Dialog: <%@ Page MasterPageFile="~/Master.Master" AutoEventWireup="true" Inherits="FVK_Demo.RequestDialog" %> <%@ Register TagPrefix="fvk" TagName="requestdialog" Src="~/FVK/RequestDialog.ascx" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"%> <title%>Facebook Request Dialog for ASP.NET</title%> <meta name="description" content="ASP.NET implementation of Facebook Request Dialog in C# and VB.NET" /%> </asp:Content%> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"%> <fvk:requestdialog ID="request1" runat="server" Message="Join to my application" /%> </asp:Content%> Facebook Request Dialog with all properties set: <%@ Page MasterPageFile="~/Master.Master" AutoEventWireup="true" Inherits="FVK_Demo.RequestDialog" %> <%@ Register TagPrefix="fvk" TagName="requestdialog" Src="~/FVK/RequestDialog.ascx" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"%> <title%>Facebook Request Dialog for ASP.NET</title%> <meta name="description" content="ASP.NET implementation of Facebook Request Dialog in C# and VB.NET" /%> </asp:Content%> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"%> <fvk:requestdialog ID="request1" runat="server" Message="Join to my application" Title="Request dialog" FriedId="23876283618381" AdditionalData="Type: 3, Item: 2" CommandType="link" CommandTitle="Request Item" CssClass="button blue" CssStyle="font-size:10px" OnRequestSentCalled = "OnInvite" /%> </asp:Content%> ConfigurationConfiguration of the Facebook Request Dialog ASP.NET control is done in ASPX page by setting mandatory property Message and other optional properties. 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:
Property Name
Type
Description
Message
String
Message of request dialog.
Title
String
Title of request dialog.
FriedId
String
Id of friend to which request has to be sent. If omited, friend selector is shown.
AdditionalData
String
Optional data which is sent with request.
CommandType
String
Can be set on 'link', 'button', or 'auto_open'. This means request dialog is opened by pressing a link, button, or automatically on page load. Default value is 'button'.
CommandTitle
String
Text of command button or link. If 'auto_open' command type is used, this parameter is ignored. Default value is 'Send Request'.
Enabled
Bool
If set to false control will not work on click
CssClass
String
CSS class of command button/link
CssStyle
String
CSS style of command button/link
Image
String
Image of command button/link
Filters
String
Set filter. Example all, app_users and app_non_users, or custom defined list
InvitedIds
String
Get invited friends ids after request is sent
Event Handlers:
Event Name
Description
OnRequestSentCalled
Call after request is sent or canceled
|