test.ical.ly | getting the web by the balls

Oct/11

5

Custom HTML on Facebook – How to create a Facebook Note on your profile or page

Last week I received a comment on my post about writing on a Facebook Page wall with no logged-in user asking if I could write an example how to post a note. Usually I don’t blog on request but I’ve never noticed this Facebook Notes feature before and found it to be quite a nice way to publish custom HTML on Facebook.

So I show you how and why.

First I took a look at the Facebook documentation about the Notes object in the Graph API. There I found a link to an example note.

This was really cool news to me as the note was much more than I expected.

Basically a note has two attributes: a subject and a message part. The cool thing about this is though that the message can contain HTML!

A note can be shared which will publish it on your and your friends stream. There it will look like a regular status message that summarizes the contents of your note automatically.

However when you click on the link in that message you will be directed to a Facebook Note page that shows the whole HTML contents of your note in your profile.

You see in this really small example that you can write HTML in the center part of the Facebook layout.

So how can you do it via the Graph API you ask?

Well according to the documentation there seems to be no way to create a note. However if you dig deep enough you will find a simple answer.

So assuming that you gained an access token (maybe like this or this) you can do the following.

It’s really simple to do. Yet the possibilities of Facebook Notes seem to be amazing.

· ·



  • http://www.chandutv.com Chandu

    Thanks for posting. Great tutorial :)

    I am just trying to do a bit different from this . As you said above

    “A note can be shared which will publish it on your and your friends stream.”.

    But I don’t want to post it on my wall or my stream. I want to post it ON THE PAGE. For example like this http://www.facebook.com/pages/3dtv/153692718042912

    As even in the document it says that you can do it.

    http://developers.facebook.com/docs/reference/api/page/

    Normally a post on page will not shows up on ur wall or stream. And “post by” will be the “page name”.

    So if you can help me out with this , will be a great thanks :D

  • http://test.ical.ly Christian

    @Chandu I think it’s all there alread.

    1. the access token decides whether you post as yourself, another user or a page
    2. when you create a note at /page_id/notes it will appear on the pages wall
    it will not however appear on the walls of the pages fans! to do that you have to share it.

  • http://www.ahmetkapikiran.com Ahmet

    Thanks for posting.
    My wall publishes. Although the pageid is entered.

<<

>>

Theme Design by devolux.nh2.me