Free tech support / small logo


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.









Subscribe!
Never miss another Q&A article! Click to subscribe: Add to Google Reader Add to My Yahoo! Subscribe in NewsGator RDF XML
Comments

Thanks for that wonderful solution.

Posted by: yomibalogun at August 17, 2009 12:43 PM

intresting

Posted by: rinul at February 26, 2010 10:06 PM

thanks for sharing this information with us

Posted by: sima at March 1, 2010 10:11 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

Posted by: sunny at May 5, 2010 9:59 AM

<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

Posted by: james at May 9, 2010 5:40 PM

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

Posted by: Steven at June 9, 2010 2:51 AM

Works very well thanks for the info

Posted by: Emma Wanjiku at September 9, 2010 8:03 AM

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.... :-((

Posted by: Sougata at January 7, 2011 2:27 PM

thanks friend

Posted by: ian at July 29, 2011 6:52 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!

Posted by: Marco Nunez at October 1, 2011 5:58 PM

I have something to say, now that you mention it, but ...
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 for all your efforts on this Web site by buying you a cup of coffee!

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











Remember personal info?


Please note that I will never send you any unsolicited email. Ever.

While I'm at it, 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.









Recent Entries


Search
I Need Help!
Need Help? Ask Dave Taylor!


© 2002 - 2012 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.

[whiteboard marker tray]
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.