Industry guru Dave Taylor offers tech support on technical and business topics, including iPhone, iPod, Microsoft Windows, Sony PSP, cellphones, online advertising, CSS, Web design, business, Unix, Linux, SEO, Mac OS X, and shell script programming.     


How can I create an "Add Me" Facebook button on my site?

I know you've written about how to create an "add me" button for MySpace, but, um, I'm not on MySpace, I'm on Facebook. is there some way to build or hack together an "add me" button for Facebook to add to my site instead? Thanks.


Dave's Answer:

That's an interesting question, and generally my answer would be "no" because Facebook has put a lot of effort into creating its own universe, generally one that's not easily reached from the rest of the Internet at large.

However, a colleague (thanks Trent Urbanski) gave me a little tip on how to reverse engineer just this sort of thing so let me share it with you so you too can create a nice "let's connect on Facebook" button for your blog or Web site...

The first thing you need to do is figure out your numeric account ID on Facebook.

The fastest way I know to get this information is to click on "Profile" on the top menu of your Facebook home page:

facebook navbar top left profile

Now scroll down a bit and you'll see your "Friends" box:

facebook profile friends count

Turns out that the link that shows you how many friends you have includes your Facebook account ID number, as you can see here:

facebook profile friends show url

You can simply copy that link with a Cmd-Click (or Right-Click) and paste it into an edit buffer to extract the numeric value. Mine account ID is 500501552 as you can see.

Now here's the hacking part: the link you want to create looks like this:

http://www.facebook.com/addfriend.php?id=yourID

For me, for example, it'd be:

http://www.facebook.com/addfriend.php?id=500501552

To make it into a button, simply wrap it in some rudimentary HTML:

<form action="http://www.facebook.com/addfriend.php"><input type="hidden" name="id" value="500501552" /><input type="submit" value="Connect with me on Facebook!" /></form>

That code looks like this in action:

Tweak and modify to your hearts content, and enjoy!

I'd also like to let you know that I have quite a bit of Facebook help here on the site and that I also have an Ask Dave Taylor Facebook Fan Page that I invite you to join.


More Useful Facebook Help Articles:
✔   How can I block event invites on Facebook?
I have a friend who keeps inviting me to webinars where he pitches his make-money programs. I really like the guy, but hate...
✔   Shortcut for blocking games on Facebook?
I saw your article from a while back about blocking Coasterville notifications on Facebook and was wondering if you had a shortcut or...
✔   Update Facebook profile picture without notifying friends?
Hey Dave! Whenever I change my profile picture on Facebook all my friends are notified of this change. Not good. How do I...
✔   How do I permanently block CoasterVille on Facebook?
My brother is really into Facebook games and the latest that he seems obsessed with is called CoasterVille. I think it's all about...
✔   Disable audio notification sound in Facebook?
This is something new: When I'm logged in to Facebook I now get an annoying audio beep every time someone posts something new...

Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
    Enter your name: and your email addr:  




Categorized: Facebook Help   (Article 9039, Written by )
Tagged: facebook, facebook add me, facebook fan page, facebook friend
Previous: Should each of my Web sites have its own IP address?
Next: Help! I accidentally bought an expensive Apple iPhone app!




Reader Comments To Date: 12

yomibalogun said, on August 17, 2009 12:43 PM:

Thanks for that wonderful solution.

rinul said, on February 26, 2010 10:06 PM:

intresting

sima said, on March 1, 2010 10:11 AM:

thanks for sharing this information with us

sunny said, on May 5, 2010 9:59 AM:

sir, please tell me how to add the themes in asp.net form. As we can inhernt the many forms with master page but a different scheme to got that work so that the website looks good and help me to got some effects in the website using asp.net

james said, on May 9, 2010 5:40 PM:

<form action="http://www.facebook.com/message.php"><input type="hidden" name="id" value="500501552" /><input type="submit" value="Connect with me on Facebook!" /></form>

this one will add a button so they can send you a message on FB as well, thought I'd add that just took a min of experimenting to figure that one out

Steven said, on June 9, 2010 2:51 AM:

Or you can also try this method...also has the "Add as friend" button...

http://www.bloganol.com/2010/03/facebook-click-add-friend-button.html

Emma Wanjiku said, on September 9, 2010 8:03 AM:

Works very well thanks for the info

Sougata said, on January 7, 2011 2:27 PM:

Sir, i'm having problem with the buffer editor as i can't get one for getting the code... i also use the new facebook profile... so please help. also tell me how to make the html code.... :-((

ian said, on July 29, 2011 6:52 PM:

thanks friend

Marco Nunez said, on October 1, 2011 5:58 PM:

Hi, I search the account ID and with the new changes in FB I don't see any number, only this:
http://www.facebook.com/MAN.Marco.Nunez?sk=friends&v=friends
Is there is another way????

Thanks!

Khiem said, on August 26, 2012 10:56 PM:

Go here for instructions to find your ID: http://www.ehow.com/how_5753004_facebook-id.html

But basically click on "Photos" in your profile and your ID number should show up in the address bar at the top. It should be something like... "photo.php?fbid=" and then a bunch of numbers. That's your ID.

Thanks for this. However, when I tested the button, facebook just gives me a warning box on their page:

Warning
The website directing you here was not a Facebook page. If you entered your Facebook login information on the previous site, you will need to change your password.

earl komts said, on April 14, 2013 10:04 PM:

Thank you for your tutorials. Keep posting such useful information. Keeps a lot of our computers humming along...

Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!

I do have a comment, now that you mention it!











I will never send you any unsolicited email. Ever.






Check This Out Too...

 
Look for Answers
Need Help? Ask Dave Taylor!


Follow Me on Pinterest

Find Me on Google+
ADT on G+
© 2002 - 2013 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. My lawyer says "Thanks".
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.