Facebook has recently released the new Open Graph API and through this it is also possible to add a “Like” button, which can be found within Facebook everywhere, even on external sites such as on your own WordPress to use blog.
Due to the huge number of users on Facebook such integration can bring to a WordPress blogger two advantages: on the one hand, it makes blog’s articles and posts popular on Facebook, where visitors will share these posts’ links and articles in their news feed to subscribers, on the other hand, you get so new visitors from Facebook.
The integration of Facebook “Like” button into WordPress is quite simple – below are two methods how to do this are presented.
Integration Option 1: Theme customization
The most preferred method is the theme adaptation. It does require a little PHP and HTML knowledge, but in the end saves you additional entries in the database and is also on the safe side when times pending a WordPress core update. Themes and theme changes are usually compatible update.
Facebook is an iFrame Snipplet available, which can be easily integrated within the post-loops in the single.php:
<Iframe src = “http://www.facebook.com/plugins/like.php?href =
<? Php the_title ()?> & Layout = default & show_faces = true & width = 450
& Action = like & color scheme = light “scrolling =” no “frameborder =” 0 ”
allowtransparency = “true” style = “border: none; overflow: hidden;
width: 530px; height: 60px “> </ iframe>
Like the function of Facebook takes a certain width in stock, as well as other information can be viewed by Facebook (see below). Therefore, one should – according to theme – schedule the entire width of the paper.
The parameter “layout” can have two modes: standard and button_count – the latter is only the number of “Likes” from the U.S. format. The first option is the phrase “1.234 fans” from.
With the “show_faces” if true, the profile pictures of Facebook users are displayed. “False” is in this case presupposes those who have no profile pictures.
By “width” is affected the inscription is in pixels. 450 pixels are necessary but at least according to our tests. It depends a little on the length of the Facebook user name – enter here should thus rather more than less pixels.
Facebook also provides two color schemes of “color scheme” available: “light” is the familiar Facebook blue and “dark” a dark gray than basic colors used for the “Like” button.
Therefore, the parameter “text” is used. The following fonts are available: Arial, Lucida Grand, Segoe 20, Tahoma, Trebuchet (20 ms) and Verdana.
Integration Option 2: Use a plugin
Those who do not feel like HTML and PHP has that can of course use one of the many plugins from the rich WordPress plugin.
We would like to present three Facebook-Like-button plugins for your WordPress blog that could be installed without any problems:
Like – this plugin is multilingual and has many options in the Settings area. You can let the button be output before or after the review text or in other places blog.
Facebook Like Button – from the structure very similar to the previous plug-in “Like”, but with a somewhat clearer setting mask.
Facebook Social plugin – this plugin is somewhat complicated, because it provides in addition to the “Like” button, various widgets. You can cancel its own Facebook list activity in the sidebar or indeed the personal taste of a collection of Facebook messages to an even fallen (Like) or the one recommended (Recommend).