Add To Facebook Plugin

I was browsing through some articles in my RSS reader when I realized that some of the articles had links on them that would add the article to the viewers Facebook account. I thought that it would be a nice idea to add this functionality to my WordPress blog so I searched for a plugin that would do this. Unfortunately I couldn’t find one. Fortunately I knew how to write one myself.

I bring you the Add To Facebook plugin. This plugin adds a link to the bottom of each post and page on your blog with the text “Share on Facebook” or the Facebook icon or both depending on what you choose on the Options page. Alternately you can add the link anywhere within your theme using a template tag.

This plugin is not compatible with WordPress 2.9+. Please use Share on Facebook for compatibility with WordPress 2.9+.

Installation Instructions

  1. Add a directory called ‘add-to-facebook-plugin’ (without the quotes) to your ‘/wp-content/plugins/’ directory.
  2. Upload addtofacebook.php and facebook_share_icon.gif to the ‘/wp-content/plugins/addtofacebook/’ directory.
  3. Activate the plugin from your admin interface.
  4. Go to ‘Options->Add to Facebook’ in your admin interface to select you options.

The CSS for this plugin is found in the included facebook.css file. This file may be edited to change the style of the link.

There are two options on the options page: Link Type and Insertion Type.

Once this option is set the link will be added either to the end of every post/page on your blog or wherever you add the template tag in your theme. When clicked the user will be brought to the Facebook login page and, after they log in, the article will be added to the Mini-Feed section of their profile.

Download Current Version
Add To Facebook Plugin 1.4.3

* 1.4.3 – Improved option saving mechanism to avoid conflicts with other plugins.

* 1.4.2 – Added a title specs to the links.

* 1.4.1 – Added slashes at end of image tags per XHTML specification.

* 1.4 – Added CSS.
– Fixed bug that prevented the Facebook icon to appear in version 1.3.

* v1.3 – Links now open in a new tab/window.

* v1.2 – Added option to use a template tag.
– Fixed bug that prevented the Facebook icon to appear in version 1.1.

* v1.1 – Added Options page for user to choose to use text, image or both for the link.

* v1.0 – Initial public release.

If you have any questions, comment or suggestions please leave them in a comment or email them to me.

If you find this plugin useful please feel free to donate a little money to help me offset the costs of this website. Thanks.