Using Ajax with FBJS in Facebook FBML Applications

by Lorien June 23, 2009 15:54

I recently had to develop an application which was to be hosted in an Application Tab on a Facebook Profile. The application needed to display a navigation menu and display different pages of information. Using an iFrame would have been anybody's first choice but Application Tabs can't host iFrames.

That's where Ajax came to the rescue. I created a <DIV> tag to host the various bits of FBML that was required for each Menu Option and changed the InnerHTML with Ajax. Here is a simplified version of what I did:

HTML Page

Create a link with an onClick event handler:

<a href="#" onclick="getFBML(); return false;">Get FBML</a>

Add your <DIV>:

<div id="Content"></div>

Create your Javascript function:

 

<script language="javascript" type="text/javascript">
function getFBML() {
  var ajax = new Ajax();
  ajax.ondone = function(data) {
    document.getElementById('Content').setInnerFBML(data);
  }
  // Specify whether the user must login before accessing this data
  ajax.requireLogin = 1;
  // Specify what type of data is being returned (Ajax.FBML, Ajax.RAW, Ajax.JSON)
  ajax.responseType = Ajax.FBML;
  // dummy Request Parameter (to demonstrate passing Params)
  var queryParams = { "param1": "0" }; 
  ajax.post("http://www.example.com/DataPage.aspx", queryParams);
}
</script>

 

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Currently rated 4.8 by 5 people

  • Currently 4.8/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Facebook | Software Development

FizzBoost 2.5 Ready for Download

by Lorien April 03, 2009 23:35

FizzBoost 2.5 has been released.

Download Fizzboost

 

Check out the Facebook Application Page and the Facebook Group Page.

The new interface is cleaner and more compact. The Window can now be resized and moved.

The usual features such as Friends, Events, Groups, Notifications and Feeds have been refined and improved.

More emphasis has been placed on turning FizzBoost into a fully functioning Twitter Client. Status updates can be made for both Facebook and Twitter. With this release it is possible to view your friend's Tweets. The next release, which will be available as an automatic update, will enable you to send direct messages to your Twitter friends.

You can view Events, Groups and Photo albums. Facebook feeds are available as well as standard Facebook Notifications.

The next release which is planned to be ready in the next few weeks will allow you to RSVP to Events, view your Friend's Photos, see photo tags, see Group and Event Members and write Notes. Whew!

Here are some screenshots:

Events

 


Event Info

 

 

Photo Album

 


 

Twitter and Status Updates

 




Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Currently rated 3.0 by 2 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

Social Networking | Facebook | Twitter

Bebo.NET

by Lorien February 18, 2009 07:52

 I have just released the first version of Bebo.NET. It is written in C# for .NET 2.0. 

 Bebo.NET is a set of .NET class libraries which can be used to wrap calls to the Bebo.com APIs. It is based on Nikhil Kothari's Facebook.NET project.

 It is hosted on CodePlex and you can find it here. It is a straightforward port of Facebook.NET and so any documentation relatiing to that project is pertinent to this one. Bebo might have some differences that have not been considered but, as this project is now open-source, hopefully other developers will take up the torch and carry it forward. I will be updating it on a regular basis as I am spending a lot of time, at the moment, writing applications for Bebo. 

 I spent a lot of time looking around for other projects like this but since Bebo is not as popular as Facebook there hasn't been much to go on. So.. I hope this helps those that are interested. 

   

Bebo.NET project on Codeplex

 

 

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Bebo | Software Development

Fizzboost 2.0

by Lorien November 19, 2008 06:56

 

FizzBoost 2.5 has just been released so please head over to the 2.5 post to download and for more information.

 

Fizzboost is a Facebook Notifier that was developed a few months ago. Facebook has since made many changes to their underlying architecture and so some features do not work as well as they used to.

A new version is in the wings and hopefully I will be able to get a release out shortly.

It is difficult to spend much time on it because, as we all know, time is money. If enough people suggest putting a Paypal button up to support the project then I'll do that will absolute pleasure. I would love to see Fizzboost become the greatest all-time notifer. 

 Fizzboost for Facebook

 

Features

  • Status updates can be made directly in FizzBoost now. If it is the first time you are updating your status in FizzBoost then it will load the Facebook permission request into your browser. This will only happen once.
  • You can now update Twitter Status directly in FizzBoost. You can also tell FizzBoost to keep your Twitter Status in Sync. So when updating your Facebook Status it will also update your Twitter Status.
  • FizzBoost now plays sounds when there are Notifications. You can play the default or customize the sound.
  • View your Facebook Feeds directly in FizzBoost

 

  Visit the official Facebook Application page.


 

 

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Facebook

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen | Modified by Mooglegiant