how to put app in your profile ( Profile Box )

Mar 19, 2010 at 3:55 PM


I'm new to facebook development. 

I have tried to write very simple application and put it into my profile.   <- link with image of facebook application 

I would like to do exactly the same thing as on image ( app is marked with red rectangle ;-) ) 

I would be grateful for your help. 

I have spend many hours searching over facebook documentation and internet. 

Thanks in advance 


Mar 19, 2010 at 4:39 PM
Edited Mar 19, 2010 at 5:14 PM

You need to do two things:


1. Goto your Facebook Developer -> Edit Application -> Profiles -> Fill out the Tab Name and TAB URL (this URL is the url of what gets rendered in the box)

2. Add the "Add to Profile" button

<cc1:AddSectionButton ID="AddSectionButton1" runat="server" Section="Profile">

you also need to call Api.Profile.SetFBML(user.uid, "Your Text Here", null, null); // if you don't do this, you won't see the button

That's all.

See also:


Mar 19, 2010 at 6:07 PM
Edited Mar 19, 2010 at 6:12 PM

I have done the above, and am getting the following error during the call to SetFBML:

Error Message:System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.
 ---> Facebook.Utility.FacebookException: Session key specified cannot be used to call this method
   at Facebook.Utility.Utilities.ParseException(String response, Boolean JSONFormat)
   at Facebook.Rest.RestBase.processResponse(WebResponse webResponse)
   at Facebook.Rest.RestBase.SendRequestSynchronous(IDictionary`2 parameterDictionary, Boolean useSession)
   at Facebook.Rest.Profile.SetFBML(Int64 uid, String profile, String profile_main, String mobile_profile, Boolean isAsync, SetFBMLCallback callback, Object state)
   at Facebook.Rest.Profile.SetFBML(Int64 uid, String profile, String profile_main, String mobile_profile)
   at FBApp.ProfileTabPage.Page_Load(Object sender, EventArgs e) in C:\Projects\FBApp\FBApp\ProfileTabPage.aspx.vb:line 19


  Dim sProfileMain As String = "This appears on wall/info"
  Dim sProfileBoxes As String = "This appears on boxes<fb:narrow>Narrow side content</fb:narrow><fb:wide>Wide side content</fb:wide>"
  Api.Profile.SetFBML(CType(Api.Users.GetInfo().uid, Long), sProfileBoxes, sProfileMain, Nothing)

Any ideas?



P.S. Yes, I know the profile boxes are going away, my boss wants me to do it anyway.  :)