|
Add to Profile Button component is used to add content created with API.profile.setFBML method from Facebook Developer Toolkit to the user's wall or to the user's boxes tab. If content is already added, the button is not shown anymore. The source code for this ASP.NET control is available in C# and VB.NET languages as part of Facebook ASP.NET Controls for iFrame apps library. Picture of Add to Profile Button component and popup shown after the button is pressed:
Register component by adding following line in ASPX file: <%@ Register TagPrefix="fvk" TagName="addtoprofile" Src="~/FVK/AddtoProfileButton.ascx" %> Insert control in ASPX file as: <fvk:addtoprofile ID="addtoprofile1" runat="server" />
Example of setting FBML in C# language: string fmbl = "<h1>Hello</h1><fb:profile-pic uid=\"" + API.uid + "\" linked=\"true\" />"; API.profile.setFBML(API.uid, fmbl, fmbl, null); Example of setting FBML in VB.NET language: Dim fmbl As String = "<h1>Hello</h1><fb:profile-pic uid=""" & API.uid.ToString() & """ linked=""true"" />" API.profile.setFBML(API.uid, fmbl, fmbl, Nothing)Example shows setting FMBL with Hello text and linked picture of an user bellow it. |