Jun 9, 2007 at 11:48 PM
Are there any code example of profile.SetFBML? I can't find it in the doc anywhere.
Jun 11, 2007 at 3:19 AM
Sorry Tom. I just implemented the SetFBML on Friday. I need to do a bit more testing with it, and then I will add it to the doc prior to officially releasing v1.1.

Are you having a problem calling it?
Jun 12, 2007 at 6:35 AM
It's great to see more support for the API !!!
that aside I have a problem with setFBML()

There seems to be a limit to the amount of markup I can push. I build my FBML dynamically (several items on a html table) , If I call the method with 3 items in the table it works, any more and it breaks.

I receive this error msg:

The remote server returned an error: (414) Request-URI Too Large.

Any clues? I'm pulling my hair out.

Jun 12, 2007 at 7:51 AM
Yes. This must be a problem with the fact that everything is posted as url parameters. There is a limit to the size you can post as a url. So, we probably hit a limit pretty quickly with that approach.

I have not seen anything that would allow me to "post" instead of "get". But, I will do some checking. As, there must be a different approach that is allowed.

Does anyone have any ideas?
Jun 12, 2007 at 8:00 AM
It looks like it is valid if I change over from a "get" to a "post". Which should solve the problem. This will take a couple hours. But, I will try to get to it in the next day or two.

I will keep you updated.
Jun 12, 2007 at 4:40 PM

I just posted new source and binaries that change the HTTP GET to a POST. I did some preliminary testing and it seems to remedy the issue you are seeing. Can you try it out?
Jun 12, 2007 at 8:17 PM
I have verified that setFBML works for

"<fb:profile-action url="""">click me</fb:profile-action>"
Jun 13, 2007 at 8:06 AM
Edited Jun 13, 2007 at 8:13 AM
I downloaded the change set 5421 and it still didnt work, depressed (well not really) I went out for a stroll. When I came back the magical change set 5502 appeared and the world made sense again.

In other words setFBML is working!

Thanks rpowers
Jun 13, 2007 at 8:35 AM
Heads up...
I had a problem with US users working fine and UK users getting an Incorrect signature error.
It was choking on the "£" symbol, make sure you use Server.HtmlEncode.

Jun 13, 2007 at 6:00 PM
penko make a bug tracker ticket, it's hard to see important things in these threads
Jun 15, 2007 at 7:57 PM
Can someone answer the OP? I'd like to see an EXAMPLE of using setFBML from the API.

Jun 21, 2007 at 5:18 PM
Do you still need a sample?
Jun 22, 2007 at 2:20 AM
Hi All,
This ToolKit is the best out there I just started playing with it 2 days ago and I am having lots of fun.
Yeah I would love to see a sample of using setFBML since i can't figure it out.

Jun 23, 2007 at 4:18 PM
Hi All,
My application is developed in
Are there any code samples for Profile.SetFBML function?
Jun 25, 2007 at 10:27 PM

What issues are you having with SetFBML?

You can call it with any valid FBML?

Facebook.Entity.User u = _fbService.GetUserInfo();
Collection<Facebook.Entity.User> f = _fbService.GetFriends();

_fbService.SetFBML("Hello " + u.Name + " you have " + f.Count + " friends.");

This works fine. You can also include FBML markup around your call.

The tougher thing is actually setting up your canvas page to work correctly. I am working right now on providing some samples, doc and base pages to ease this process.
Jun 25, 2007 at 10:30 PM

rpowers119 wrote:

What issues are you having with SetFBML?

You can call it with any valid FBML?

Facebook.Entity.User u = _fbService.GetUserInfo();
Collection<Facebook.Entity.User> f = _fbService.GetFriends();

_fbService.SetFBML("Hello " + u.Name + " you have " + f.Count + " friends.");

This works fine. You can also include FBML markup around your call.

The tougher thing is actually setting up your canvas page to work correctly. I am working right now on providing some samples, doc and base pages to ease this process.

I think getting the base samples up on setting the canvas page and the profile boxes setup would be amazing. Then people can hack their way around :)
Jun 25, 2007 at 10:32 PM
I should have it within the next day or 2.

Jul 17, 2007 at 4:12 AM
Hi guys
Can anyone tell me which characters are illegal for the markup passed into the SetFBML method? I would prefer not to run HTMLEncode over the text if it can be avoided.
Jul 18, 2007 at 12:31 AM
Just in response to my own post.
With some help from a colleague we were able to stop the Incorrect Signature error happening by forcing UTF8 encoding on any content that was to be displayed on the profile page.
As follows:
string utf8Blurb = Encoding.UTF8.GetString(Encoding.Default.GetBytes(contentString));
I was having trouble with the curly single and double quotes. The above code stripped them out completely.
I don't know if the setFBML method should do that automatically because it probably should be up to individuals to deal with the inappropriate characters the way they want to. But I guess if stripping them out means the method works if they miss any, that might be a good thing. It took me a hell of a long time to realise I wasn't running UTF8 encoding by default and it was the dodgy characters throwing that error.
Hope that helps people
Jul 18, 2007 at 3:59 PM
Thanks. I will play around with this issue later today.

Thinking of posting a discussion around whether setFBML should solve this on behalf of all users. But, this tip looks great.
Jul 18, 2007 at 5:50 PM
More information about setFBML:

Also, you can use the <fb:profile-choice> FBML as well as other stuff in the setFBML command together.

So, you could use this:

<fb:profile-action url="">
<fb:name id="userid" possessive="true"/> Widgets!</fb:profile-action>
<div>Some more data, from your code</div>
<div>Still more data... Blah Blah Blah</div>
Jul 25, 2007 at 5:11 AM
I am still receiving this error when trying to post strings that contain unicode like the "tm" symbol, or the "(r)" symbol. I have tried using "Encoding.UTF8.GetString(Encoding.Default.GetBytes(contentString))" and "System.Web.HttpUtility.HtmlEncode" with no luck. I keep getting the incorrect signature error. Does anyone have any other suggestions?

Jul 25, 2007 at 4:42 PM
I had some issues with the SetFBML.

1) It didn't like {}s in my FBML so I changed
parameterList.Add("markup", String.Format(CultureInfo.InstalledUICulture, markup))
parameterList.Add("markup", markup)

in SetFBML in facebookAPI.vb

2) I got errors about 'incorrect signature'. Turned out I'd got my app key and secret wrong in the code!
Jul 25, 2007 at 8:04 PM
Yes. I will check in the code today with the String.Format removed. That seems to take care of the character issues in the FBML markup.
Jul 26, 2007 at 12:35 AM
I'm having trouble with setFBML. I'm using PHP5. I'm not sure whether it has anything to do with the way I use it, but I basically followed the simple example on the facebook tutorial page.

This is the way I'm calling it right now

$fbml = 'HELLO';
$facebook->apiclient->profilesetFBML($fbml, $user);

and this piece of code is in the appinclude.php file included in the index page. The contents in the profile box doesn't change at all, and only showing what I put in the default setting.
Please any suggestions would be appreciated.
Sep 29, 2008 at 5:03 AM

I am looking fo a solution in my problem. I have my application and uses FbService.SetFBML.

I would like to update the fbml on my profile but I cannot find any ways of doing this.

Is there anybody can help me with my problem?

I would appreciate that a lot.

Oct 1, 2008 at 1:35 AM

I have the same problem, can anybody help us?

Why FbService.SetFBML() doesnt post any info to user profile box?

Thanks in advance!
Oct 1, 2008 at 1:58 AM
If you're running v1.7 it'll never show up on the user's profile since the recent Facebook redesign.  The user will only ever see it in their "Boxes" tab.

If you're running v2.0 it'll show up in "Boxes" by default also but the user then has the option to move it to their profile page (click the little pencil icon).
Oct 1, 2008 at 8:25 AM
The thing is that im trying to use SetFBML from both versions (1.7 and 2.0) but neither post the info to user profile boxes.
Could you please help me with the source code example how to post some FBML to user profile boxes?
Oct 1, 2008 at 2:32 PM
I'm using an IFrame-based MasterPage with this line...

this.API.profile.setFBML(this.API.uid, stringBuilder.ToString(), stringBuilder.ToString(), null);

The stringBuilder is basically some FBML starting with "<fb:fbml version='1.1'>".
Oct 6, 2008 at 10:22 AM
I can get pictures to show on my profile tab, but they don't show on the boxes tab.  Hyperlinked text shows though.  Has anyone come across this?
Oct 7, 2008 at 10:24 AM
Could you please help me with 1.7 version sample of setFBML? Im trying to use it but it doesnt work at all.
Oct 8, 2008 at 10:32 AM
Could anyone please help me with the profileboxe posting using setFBML ? Im trying to use in both version 1.7 and 2.0 - but no effect. Function API.profile.setFBML(...); returns "true", but i dont see any profile boxes added by my test application. Tell me please may be i need to set some option in application settings???
Oct 20, 2008 at 9:03 AM
If anyone can show where on Facebook "setFmbl" updates, it would be very much appreciated.
Oct 21, 2008 at 12:07 AM
Edited Oct 21, 2008 at 12:08 AM
You can find working profile.setfbml on my tutorial:

The tutorial is a work in progress, but will probably ultimately get scrapped if the FDT is ever developed further.
Nov 18, 2008 at 10:30 PM
Hi everybody,
I am also programming a facebook application in asp, but I can't see any possibility to have the function setFBML. Where do you find it?
When I write "fbservice." no setFBML method is proposed...
Do you have the solution? Thanks