Inspire user to bookmark your facebook app

facebookIf you develop facebook application then you should inspire your user to bookmark your application. If users like your application they will surely use it more often. And if they found bookmark button in the app they might click it to bookmark the application. As a result user will use your application easily.

There are 2 ways to show bookmark button in your facebook application and facebook connect base application

  1. FBML/XFBML base
  2. FBJS base


If you want to render the following button and bookmark action, you should use fbml code in your canvas page.

<fb:bookmark />


If you want to render this in iframe base facebook app, then you should use the code following way


If you want to fully customize then you can use the following javascript method in your canvas/iframe base application. This method will pop up a bookmark dialog and will prompt the user to bookmark the application. So a link to your application appears among the user’s application bookmarks


So you can use this way

<script type="text/javascript">
  function callback(){
     //Callback to be executed after the dialog closes. The callback should be a function with no parameters.
<a href="#" onclick="Facebook.showBookmarkDialog(callback); return false">Bookmark this app</a>

For FBConnect base application you should use

FB.Connect.showBookmarkDialog(callback); //as like as Facebook.showBookmarkDialog(callback);

But you have to make sure that you specified a Bookmark URL in your application settings.  If you didn’t specify bookmark url then when user will click the bookmark icon it will redirect them to the application canvas url.

mahmud ahsan

Computer programmer and hobbyist photographer from Bangladesh, lives in Malaysia. My [Github | Business | Twitter | Linkedin | Youtube | Instagram | 500px]

You may also like


  • ranacse05
    February 13, 2010 at 4:01 pm

    Cool , thanks bro , i was looking for this .

  • Robert Uomini
    March 14, 2010 at 1:08 am

    Hi, Mahmud,

    Your article is very tantalizing, as it leaves open a key question: how do you implement a bookmark button for and iframe app whose canvas page is written in HTML? I can’t just add or because this results in an error, due to the presence of the tag. TIA!

  • Robert Uomini
    March 14, 2010 at 1:11 am

    Damn! Your code deleted the fb:bookmark tags from my post. What I was trying to say is that adding the fb:bookmark tag causes an error.

  • Robert Uomini
    March 14, 2010 at 1:11 am

    …”presence of the body tag”

  • Vijay
    July 18, 2010 at 1:51 pm

    above code is not working for the IFrame Application.

    Can any one help me out???????????????

  • Morgan Callar
    April 5, 2012 at 3:01 am

    Hey not to set off topic but can anyone give me a review of. New York Car Insurance Reform 295 Greenwich St, New York, NY 10007 (646) 351-0824 They are down the block from me. I was wondering once they were a good insurance agency. I need to get hold of coverage, it is regulations you know, but I need to have a good price price plus I’d prefer friendly service.

Comments are closed here.