We've released the latest version of the Facebook Developer Toolkit on CodePlex.
This release addresses a change to the Profile.SetFBML() method within the Facebook API. As of Thursday, Jan 17, 2008, Facebook will no longer accept the legacy version of this method, which allowed three versions of Facebook Markup Language (FBML) within the same parameter. The updated version of the Profile.SetFBML method will accept three separate parameters to limit unnecessary parsing, which will ease profile load times.
Using the Facebook Developer Toolkit, the previous call of
FBService.SetFBML(generalFBML, FBService.UserId);
now becomes
FBService.SetFBML(profileFBML, profileActionFBML, mobileProfileFBML, FBService.UserId);
A full example to test setting the profile FBML would look like:
new protected void Page_Load(object sender, EventArgs e)
{
base.Api = FACEBOOK_API_KEY;
base.Secret = FACEBOOK_SECRET;
base.Page_Load(sender, e);
if (!IsPostBack)
{
try
{
// Use the FacebookService Component to populate Friends
Facebook.Entity.User u = FBService.GetUserInfo();
Collection<Facebook.Entity.User> f = FBService.GetFriends();
//Test Get/Set FBML (Profile parameter)
string userMessage = string.Format("Hello, {0}, you have {1} friends!", u.Name, f.Count);
FBService.SetFBML(userMessage, null, null, FBService.UserId);
lblHelloWorld.Text = FBService.GetFBML(FBService.UserId);
}
catch (Exception)
{
// do error handling
}
}
This is a breaking change for existing code, which we felt was more logical than throwing a runtime exception. Post comments to the CodePlex site's discussion board if you have questions or comments.
The Twitterlight Coding4Fun article has been published. I've added some updates, including url link support. Check it out!
All the source code is available, just make sure you add in references to the C1.Silverlight.dll.
Enjoy. - steve
=======================================================================
I ended up with a bit of bench time this week, so I've been working on two projects here at Clarity: Eating Jimmy Johns like it's going out of style, and immersing myself in Silverlight 1.1/2.0 and the accompanying control toolsets. Also my foos skills apparently never left.
Lately I've become a regular Twitter user (everyone: "hello, steve"), and was itching to play with the Twitter API, so I set out to create a Silverlight 1.1 mashup. I also wanted an auto-updating page to use for viewing my tweets, without having to install a desktop app.
Visit the Twitterlight Alpha.

My goals here were:
Experience the joy of working around Silverlight cross-domain call prevention. Btw, different ports in VS count as cross-domain too. This is achieved by hosting a local web service within your web project, which can in turn call external web services to marshal your Silverlight app its data. I'm not going to step through how to do this, as tutorials are popping up like crazy on this... although most refer to the "Add Silverlight Link" step as "magic". This goal was job one for me, because, while it's easy to see the initial draw to the beautiful designs created via XAML/Blend, unless true functionality can be added to these apps, this technology won't spread at the speed I'm hoping it will.
Test drive some emerging control sets. For starters, I've used ComponentOne's Sapphire Toolset Alpha. My cube neighbors can vouch for a bit of the learning curve you may experience tackling an alpha release component suite, but all in all I think C1 is doing a really nice job with their controls. Documentation and forum support are not great, but will come in time; and the coming of Blend support will only make using these controls easier. For now, I pretty much stuck with creating all C1 controls via C#, as Intellisense helps discover what's available for use.
Deploy a Silverlight app. Done and done. The apprehension I felt regarding moving away from good old "localhost" was unnecessary... The only major change required by my solution was to select the Silverlight project's Web Reference to the local web service, and change the "Web Reference URL" property to the new, deployed web service location. Copy, paste, deploy, foos.
You will need to install the Silverlight 1.1 Alpha September Refresh before running this... browser-wise I've tested in IE7 and Firefox 2.0. And of course, you'll need a Twitter account! I'll post the code in the near future for this app, in the meantime I plan to try some other toolsets.
Email me at sholstad@claritycon.com with feedback. I'm available on Twitter at http://twitter.com/steveholstad.
Upcoming additions:
- TinyUrl and hyperlink support
- Resize to full browser size
- Search for and follow other Twitterers
Some Silverlight 1.1 / ComponentOne Sapphire Gotchas: (Updating as I go)
- Textboxes would not accept text(!) unless FocusManager.Initialize(this) is called on page load.
- Tab does not move focus to next control, it moves focus back to the browser (enhanced silverlight keyboard support is on the way)
- Cannot create password-masked TextBox, and even the workaround posted cannot work due to an alpha bug in C1 control... this explains why I have the horrendous white background/white foreground password textbox in this demo...
- C1 controls are not functioning as expected in Safari
- Have heard reports that Vista x64 users can't view Silverlight content
Add to: | Technorati | Digg | del.icio.us | Yahoo | BlinkList | Spurl | reddit | Furl |