static profile fbml for all users, how ?

Feb 14, 2008 at 1:40 PM
I am new to facebook, and to this toolkit, but this looks like the best solution for a NET (C#) developer like me.
I spent the last night, going over (houndreds) of examples, on how to work with facebook.
I worked with all the samples, and while I cannot get the FBML samples to work correctly (when redirected from facebook, it tells me there is an error), I did get (and understood) how IFrame sample works, and it looks like the way to go.
My scenerio is supposedly simple, but I cannot figure out what to do.
Actually all I want, is users that load my application, to see on their profile a line of text (just as I would do with setFBML...).
This line of text, is "static", and is not based on the user (globally the same for all users). This text, will change every 5 minutes or so, and I would like it to be updated on all users who have my application, without needing them to go to my application (canvas page)..I would like it to refresh on the users profile.. I found the new DATASTORE facebook is giving, and thought I can have an external program update my DATASTORAGE values every 5 minutes, and letting the users refresh from that... But I do not even know how to call my DATASTORAGE values...
I believe I do not even need a web page for this, can I not use the DEFAULTFBML in my application settings on facebook, to quary my DATASTORAGE values? Why does the SETFBML needs to be called from a web page at all?? I would like to keep my webserver untouched as there is nothing needed per request..
I read about the fb:ref , and handles, but all examples arein PHP ,and I am getting lost..
Anyways, I am confused, and while it looks I can make an application that browses the users friends and pictures, I cannot make something simple as update the user profile with simple static text...
At the moment, it looks like I will continue to work based on the samples, and have each user log in, and setfbml for each user on my default.aspx page...but thats loads on my server for no reason...any help would be great.
Thanks, and hopefully soon I will be able to answer, and not only ask.
Feb 14, 2008 at 2:29 PM
Edited Feb 14, 2008 at 2:41 PM
If you need to change Facebook user profile content from your aspx page, you have to

1. Include Facebook name space in your aspx page
using Facebook;
using Facebook.Entity;
using Facebook.WebControls;

2. Inherit the aspx page from CanvasIFrameBasePage
public partial class FacebookBC : CanvasIFrameBasePage

3. Use SetFBML() to change the profile content and put following FBML string in
if "Default Profile Box Column" value of your Facebook application is "Wide", FBML will be
<fb:wide>your static string</fb:wide>

if "Default Profile Box Column" value of your Facebook application is "Narrow", FBML will be
<fb:narrow>your static string</fb:narrow>

"Default Profile Box Column" value can be changed from your Facebook application setting

Feb 14, 2008 at 3:05 PM
Hi, and tnx for your quick reply.
But does that not mean, that my webserver will be called everytime, just to write the "your static string" , in the profile??
Is there anyway to use the DataStorage types I created, and call them directly from the "Default Profile Box Column" ?
And if that is possible, how can I use an external application to update the DataStorage values in facebook every x minutes??
Also, how do I force the user profile, to refresh my application profile text, every x amount of minutes?
I did read about creating a handle, and refaring to it...but I am still very much confused..

I do understand how to do it the way explained above, but i thought I could save alot of webserver proccess ,as my application does not need user specific details to create the profile text..
tnx again,
Feb 14, 2008 at 5:32 PM
Edited Feb 14, 2008 at 6:03 PM
Facebook Data Storage API still under beta stage. I don’t think you could call these API functions through Facebook developer Toolkit (ver 1.6), maybe the next version will have all these new API functions.

Based on my understanding the Facebook application box (display in user profile and under application name) is a part of application, when user add your application, the content of application box need to be set by the application, so that user can see the information or action about the application and if user use your application to do something, the application could update profile application box content accordingly, but your application hosted on your own server, it will go back to your server every time.

I have no idea how to update application box content based on time setting (every 5 mins) , but you could try <fb:random> tag of FBML, it can show massage randomly

<fb:random-option weight="2">A: This will be shown 2 times as often as B.</fb:random-option>
<fb:random-option weight="1">B: This will be show half as often as A</fb:random-option>
Feb 14, 2008 at 6:40 PM
Thank you, and good luck with this toolkit, i will be happy to help where I can...
I admit I like c# too much, to try something else...
Feb 15, 2008 at 9:20 AM
Edited Feb 15, 2008 at 9:33 AM

cityrock wrote:
Thank you, and good luck with this toolkit, i will be happy to help where I can...
I admit I like c# too much, to try something else...