Posting a message to someones wall can contain the following parameters:
var url = ‘http://www.sundh.com/’;
var title = ‘This is the name of my post’;
var desc = ‘Optional description of my link’;
var picUrl = ‘http://www.sundh.com/blog/images/led.jpg’;
To post the following to my wall this javascript code is executed:
function(response) {
if (!response || response.error) {
alert(‘Error occured’);
} else {
alert(‘Post ID: ‘ + response.id);
}
});
If I decided to not define the parameter “description” the post will grab the text appearing on the URL.

Youtube clip
Posting a YouTube clip to someone’s wall requires a little bit different code in order to be able to play the YouTube clip within Facebook. Note that the URL to the YouTube clip is different from the URL shown in the browser when you watch the clip. Instead of “http://www.youtube.com/watch?v=VIDEO_ID”, it is set to “http://www.youtube.com/v/VIDEO_ID”. The thumbnail of the YouTube clips is easly retreived by accesing the URL “http://img.youtube.com/vi/VIDEO_ID/0.jpg”.
var url = ‘http://www.youtube.com/v/VIDEO_ID’;
var title = ‘Title of YouTube clip’;
var desc = ‘Description of YouTube clip’;
var picUrl = ‘http://img.youtube.com/vi/VIDEO_ID/0.jpg’;
The trick that makes the YouTube clip embeddable on Facebook is to add the parameter “source” in you API call to Facebook. The source is the same as the URL to the video clip.
if (!response || response.error) {
alert(‘Error occured’);
} else {
alert(‘Post ID: ‘ + response.id);
}
});
The result looks like this:















