Virally Promoting Your App With FBML
The following section describes several tags that you can use to virally promote your application. One of the strengths of Facebook is the rich access it provides to friends lists, and the tools it offers for promoting applications through those friends. As an application developer, with just knowledge of FBML you can do many things to spread your app to others on Facebook very quickly.
Request and Notification Tags
Notification tags require some API knowledge and access, but as you saw in the “Hello Friends” example in Chapter 1, with request tags you can create simple invite forms using just a series of FBML tags.
Feed Forms
Feed forms are another shortcut you can take for virally
spreading your application. By adding a simple fbtype
attribute to your form, Facebook will intercept your form
submission and present the user with a dialog box that asks if the user
would like to publish a news item to either their Mini-Feed or their
friends’ News Feeds. The code referenced in the
action
parameter of the form should return JSON data
in the form of a News Feed template. The following is an example of the
form you submit. Notice the fbtype
attribute in the
form (you can also see this in action in the FBML Essentials app on
Facebook):
<form fbtype="feedStory" action= "http://fbmlessentials.staynalive.com/index.php"> <input type="text" name="status" value="" /> <input type="hidden" name="submit" value="1" /> <input type="hidden" name="action" value="feedforms" ...
Get FBML Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.