Tuesday, March 16, 2010

Add Suggest to Friends box in your Custom Facebook Welcome Page ( using FBML )

Before you start coding with FBML i will explain how to create a new landing tab which can be coded with FBML. In Facebook application list there is an application called "Static FBML". As the first step you need to visit there and click "Add to my Page". Then it will pop a list of Pages where you are the admin of. Select it and proceed.
Next get into your fan page. And try to add a new tab to your fan page. The "Static FBML" will appear there as an option. It will be automatically named as "Static FBML". Now visit back to your wall (Fan Page's Wall) and click "Edit Page". Then when you scroll down this page you can see the application named "Static FBML". Click Edit. Then it will prompt you a very simple text editor. So set the title as you wish. And insert the code below. Your own code can replace the text in CAPS.
<fb:request-form
method="post"
action="/index.php"
type="NAME OF YOUR FAN PAGE"
invite="true"
content="WHAT EVER YOU LIKE TO SAY
<fb:req-choice url='URL OF YOUR FAN PAGE' label='WHAT EVER' /> ">
<fb:multi-friend-selector actiontext="ANY HEADING YOU LIKE"
rows="3"
max=35 
showborder="true" 
cols="2"/>
</fb:request-form>
So for my fan page i used the following code.

method="post"
action="/index.php"
type="Travel Sri Lanka"
invite="true"
content="Please Join Facebook fan Page Travel Sri Lanka  "> 


Keep in mind: as soon as you finish editing it may not work. You might see the friends list empty. Just log off from your Facebook and try may be after 6 hrs. Then it works :). Here is my fan page with an additional photo. you can check it here.


PS: IF you have a BLOG, WEB-PAGE and IF You want to advertise it Free. TRY FREE-ADDS Im using it too. Here you can create an account easily. 


9 comments:

Armin said...

Hey, I have been looking for this script, thanks..

Had a query.. there is a limit on the number of friends I can suggest ie 6. Is there a away to increase this limit or remove it completely?

I noticed on this page http://www.facebook.com/?ref=logo#!/BMW?v=app_117031561654955&ref=ts
the limit is 8..

Your help would be appreciated.

Thanks
Armin

Dinesh Wijekoon said...

Hay,

i don't know how to make it happen. And the number of suggestions vary in time to time. On the time of i'm writing this it was around 12. FB people change it. I havent found any variable to set that value.

Enjoy..

Ellithy said...

thaaaaaaaaaaaanks
it finally worked !

sajad said...

dear when i add new tab to my page, and select fbml .. i just get an empty page, there is no place where i can put the code. plz tel me how can i cope with this problem

Custom Facebook Fan Page said...

Hi,
greate code and nice blog,
Thank you for sharing excellent information.


Salim

Custom Facebook Fan Page said...

Tremendous blog post, loads of beneficial information. I am about to show my buddies and ask them what they think.

custom facebook fan page

jibinjoy said...
This comment has been removed by a blog administrator.
jibinjoy said...

http://www.facebook.com/Gold101.3fm?sk=app_170717602990061

how the invite friend link work any idea

Angelina said...

Wow this is really awesome and informative to me, i am impressed by this site.

Custom Facebook Apps