Facebook Development: How to check if a user likes a page using/with FBML
Bookmark and Share

Facebook Development: How to check if a user likes a page using/with FBML and then doing something based on that information

Alternate title - Facebook Development: How to add a tab to your facebook page for static content

I've been working on a super secret project that's going to blow your gizzard and cranium once it's done, but I took a break to put together a quick quote for someone looking for page customizations and thought about this quick and easy tutorial.

First, create or use a page on Facebook:

We'll use my conception X page for this tutorial, but once you've created or have a page, navigate to that page and in the upper left, click on the "edit page" link.


Next, add the Static FBML application to your page by Facebook:

Scroll down to the bottom of 'Application' and you should see Static FBML under 'More applications' if not, click the "more applications" link and do a quick search for 'Static FBML' to find it.  Once you find it and are on the Static FBML page, click the "add to my page" link in the upper left



You will be prompted to select which which pages you would like to add to if you have muliple.

After words, navigate back to the edit your page area:

Once you have found you're way back your page's edit area, you will see the static fbml app under the applications area (which are apps currently installed on your page... yes there are a bunch, feel free to remove if you don't want them there).
Go to the static fbml options and select "edit"


You have a new tab, now add stuff and then add stuff ONLY Fans / or people that have liked the app can see:


You are creating a new tab on your page in which you can add FBML markup, or HTML. Here's an example what I've added.

Box title is the tab header.
FBML is where you add fbml and html.  

In the blue dashed lines is the FBML tag which will give you the ability to provide content only those whom like your app can see. So let's say you want to offer a prize or a coupon for those whom like your app... 
<fb:visible-to-connection>Welcome, fans, you're flying too!!!</fb:visible-to-connection>

Also, let's say you want multiple tabs that do multiple awesome things, once you save this page, add more where you see the "add another fbml box" link in the red dashes.


Let's see what we've created on our page:



here's what a user that doesn't like the page sees:



That's it, enjoy...
Recent Comments