Skip to content

Categories:

Facebook : Set user profile box FBML using .NET

I had to develop a Facebook application using the .NET platform.  So naturally I downloaded the “Facebook Developer Toolkit v1.0” from the Microsoft site (http://www.microsoft.com/downloads/details.aspx?FamilyID=CCD46762-45EC-4FBE-AD91-FC916671E734&displaylang=en).

That turned out to be a big mistake.  I found that toolkit to be lacking.  For example, I found myself unable to set the FBML for the box in the user’s profile page.  Extensively searching Google, I was unable to find a single reference as to how to accomplish this using the Facebook Developer Toolkit.  There were plenty of examples in php.  So I went to the object browser in Visual Studio and searched through the dlls for any reference to “fbml”.  There was nothing!  How could this be the case?  I must have been doing something wrong!

In desperation, I downloaded another Facebook Developer Toolkit, this time from http://www.codeplex.com/FacebookToolkit/Release/ProjectReleases.aspx?ReleaseId=9824 . I was immediately pleased to see that this was a version 1.6 instead of a 1.0 like the toolkit offered by Microsoft.

I was even more pleased to have discovered the SetFBML function that I was so desperately looking for.

So now, I can provide the exact instructions for setting the FBML of a users profile, using the toolkit supplied by codeplex:

  1. Follow this using the parts you need.
  2. Change the WebForm’s class to inherit from CanvasFBMLBasePage instead of Page
  3. Call this.FBService.SetFBML(“Your FBML”);

The FBService attribute is a public property inherited from the CanvasFBMLBasePage class, so you dont have to declare it.

Thats it! I wish someone provided this information for me before I burned a day figuring it out.

Posted in Uncategorized.

Tagged with , , .


One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. XRumerTest says

    Hello. And Bye.