January 15, 2010 | 23 Comments In my first article about WordPress, I’ll show you how to easily add a page to your WordPress site that allows your users to invite their Facebook friends to check out your website. You’ll first need to have Facebook Connect up and running on your site. More on that later. What I did was make a WordPress Theme Template that will display the Facebook Invitation screen, complete with a friend selection box. It automatically pulls your website name, URL, and description to populate the Facebook invitation fields. The reason I made this a theme template instead of a plugin, is because plugins are generally slow. WordPress loads all the code for the plugin on each page, whether the code is needed or not. This takes up valuable memory. Plus, the plugin gets called every time a page load, further cuasing overhead. With a theme template, nothing is loaded until the specific page that needs it is accessed. Some other advantages of this method are: it will automatically show your invite friends link in your page navigation, it will show up in the search engines, and it will show up in your WordPress site search as well. To use the theme template, simply upload the template file (page-fbinvites.php) to your theme directory, then create a new page in WordPress and select “Page – Facebook Invites” as the Template. It should work just fine for standard themes that have a header, sidebar, and footer. You must already have a Facebook connect plugin working on your site, though. The original plugin built by a programmer at Facebook is called WP-FacebookConnect. It allows your users to log in with Facebook and uses Facebook profile pictures automatically on comments. It also lets your users optionally post their site comments back to their Facebook profile. The plugin that I’m using on this site is the Sociable.es Facebook Connect WordPress Plugin. It is more robust than the plugin above as it adds a nice widget to show recent visitors, your Facebook friends that use the site, and your friend’s site comments. I have further modified it to show the full Facebook stream (your home page or your friend’s wall) and to also show a full list of all your Facebook friends regardless of whether they use the site or not. I’ve reached out the original developer to see about rolling these enhancements into his plugin. One thing to be careful of, though, with both of the above plugins: If you already have a large number of users, make sure they log in to your site first before connecting with Facebook or they will get a completely new user ID created on your site. There are many other Facebook plugins for WordPress, so you might want to just search for some in the plugin directory. Please let us know if you find a particularly interesting one. I’d like to thank Adam over at http://www.intafuse.com/ for asking me to help get this working on his site. It motivated me to build the theme template as the easiest way to handle this. If you’d like to help me out, please just spread the word about my Facebook Applications and the XtremelySocial.com website. Or maybe you might be able to help me one day with some WordPress stuff. I’ve had people ask how they could donate money to help pay for my dedicated webserver, so I finally set up an easy way to donate with Paypal. I also plan on writing more useful WordPress articles. Its a great blogging and Content Management System and I’ve learned quite a bit in building this site that I’d love to share with everyone.