Invite Friends to Add Application - CanvasIFRAMEBasePage

Feb 26, 2008 at 7:07 PM
This is my code

in .cs page

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.ObjectModel;
using Facebook;
using Facebook.WebControls;
using Facebook.Controls;
using Facebook.Components;

public partial class _Default : CanvasIFrameBasePage
{
//Facebook.Components.FacebookService _fbService = new Facebook.Components.FacebookService();
private const string FACEBOOKAPIKEY = "89d92671ec5570ec7afdac4554ce6b6e";
private const string FACEBOOK_SECRET = "1f7bbed42551dc2eca2ca36ae5e0ea37";

new protected void Page_Load(object sender, EventArgs e)
{
base.Api = FACEBOOKAPIKEY;
base.Secret = FACEBOOK_SECRET;
base.Page_Load(sender, e);

if (!IsPostBack)
{
string txt = this.FBService.MultiFriendSelector(new Uri("http://apps.facebook.com/XXXX/default.aspx"), "'This application does something to your friends. Join me in the Application!' <fb:req-choice url='http://www.facebook.com/add.php?apikey=89d92671ec5570ec7afdac4554ce6b6e' label='Check out the Application!' />", "Add My Application", "", "request", true);
lnkAdd.NavigateUrl = txt;

}

}


this is on aspx page::


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Index</title>
</head>
<body>
<form id="form1" runat="server" style="height:auto;">

<asp:HyperLink ID="lnkAdd" runat="server" Target="_top"> </asp:HyperLink>
</form>
</body>
</html>