Social Graph Protocol Plugin For WordPress
The Social Graph Protocol plugin for WordPress is a little thing I put together way back in August of 2011 I did various updates to the software but haven’t touched up on it in about nine months. It used to be hosted at my old domain bizzylabs.com, however I let that domain expire and have decided to put some new life into the project.
The Social Graph Protocol plugin is a simple and easy way that enables you to incorporate your websites content into the Open Graph. It basically works by including meta tags into your websites code, from there Facebook will see your posts and pages as Facebook Pages. The easiest way to think of it is when a user comes to your site and clicks a like button on your content, a connection is created between you and that user. From there your webpage has the chance to appear in that users “Likes and Interests” section of their Facebook profile.
Additionally your webpages content can also show up in places that Facebook pages show up, for example the search box on Facebook. So basically you install this plugin, insert a couple details such as a description of your website, a screenshot of your website (optional) and your Facebook user id and after that every time a user clicks like on your content Facebook puts that post or page into that users Facebook profile for there friends to see and enables your website to be searched right inside of Facebook.
Check out the little example photo below, it should help give you a little bit of a visual representation of what will happen if you have this plugin installed and a user clicks a “Like or Recommend” button on your website.
Where To Get It and How To Install It
Well if you want to download it and upload it to your servers manually than you can go to the Social Graph Protocol page on WordPress.org and easily download it from there.
However the easiest way to install it is to jump into your WordPress administration panel, go to Plugins, click the “Add New” link near the top of the page and do a search for “Social Graph Protocol”, it should show up as the first result and will be by bizzyLabs or Adam Losier, both are me because I used to run www.bizzylabs.com but recently decided I may as well stop hiding and start getting my name out there.
After you’ve found it simply click the install now button, click ok to verify, then click “Activate Plugin” and you’ve successfully installed the plugin. Easy Enough.
Setting It Up After Installation
I’m going to break this into two parts, the first part I’m going to go over some of the basic plugin settings and the second part I’m going to cover a bit about the individual post and page settings. But for this first part, after you’ve installed the Social Graph Protocol plugin, simply find the link labeled “Social Graph” from your left hand tool bar in your WordPress administration panel.
Once there you’ll be presented with four different settings that I discuss below, within the plugin I’ve also added help documentation to the page so you can reference this material right inside the plugin. All you need to do is click the little “Help” link in the top right when your in the plugin settings page.
Site Description: This is where you’ll want to add a short one or two sentence description of your website in general. Keep this short and to the point, I would suggest keeping it under 150 characters, basically no longer than a Tweet and your in the sweet spot. Additionally this is actually an optional setting, it’s not 100% required because if it’s missing the plugin will automatically fill it in with your websites “Tagline” located in the Settings of your WordPress administration panel.
Site Image: This is an optional feature, basically it’s a good thing to have because it provides anyone looking at it on Facebook a visual representation of your website, you can create a screenshot of your site using Photoshop or some other editing program and then upload it to WordPress using the “Media” tab. However your image MUST be at least 50 px by 50 px (actually a minimum of 200 px by 200 px is preferred), have a maximum aspect ratio of 3:1 and can only be a PNG, JPEG or GIF.
Facebook UIDs: This setting requires a comma-separated list of either user Facebook user ids and/or Facebook platform application ids (Only use the ids of people or applications you trust to administer your websites content). Obtaining your Facebook user id requires you to visit the Facebook Insights page and to click the green “Insights for your Website” button that will then generate a popup window with something that will look like “<meta property=”fb:admins” content=”498456415648456” />” I’ve highlighted the part of the code that contains your Facebook user id. Just take that number and use it for this setting.
Disable Namespaces: In order for this to work our software needs to add code to your websites html tag, sometimes people will hard code the xmlns:og and xmlns:fb namespaces into your websites theme. To determine if these entries already exist simply visit your website, right click your mouse and select view source. Near the top of this document find the tag that starts with <html if this tag contains the words xmlns:og and xmlns:fb then you can put a check-mark in this box (P.S. Do this before you activate the plugin). If it does not then you can leave this field unchecked and the software will automatically add the required tags to your theme.
Post and Page Specific Settings
After you’ve got all that worked out you’ll notice now that on your posts and pages edit screens additional options below the post editor, take a look at the screenshot below to see what I mean.
You’ll notice six different sections under the new meta box generated by my plugin. They are General Settings, Location Settings, Personal/Business Settings, Video Settings, Audio Settings, and Product Settings.
You don’t have to fill out every single section for each post you make, in fact you don’t have to fill out anything if you don’t want to and everything will still work fine, however by filling out certain details pertaining to your specific post or page it will increase the effectiveness of the plugin.
For instance lets say I’m writing just a general post about the television show “Gold Rush” under the general settings I could change the Type parameter to display as “Tv Show” instead of the default “Article”, this lets Facebook know that what I’m writing is going to be about a particular television show. If you don’t know which option to select, simply leave it as “Article”. Additionally you can fill out an optional Title, Description, or image URL for this post. For this example I would not fill out anything else.
Another example is if I’m writing a post about a particular restaurant I can then set the “Type” parameter under the general settings to “Restaurant” and I can fill out some addition information about that restaurant if I want to for instance I can enter in some location settings, where in the real world does this restaurant reside, its longitude and latitude, city, street address, country, ect… I can even take it one step more and enter in some values under the “Personal/Business” settings, I can enter in the companies email address, phone and fax number.
By now I think you get the point, you don’t have to fill out all the additional options for every post, actually I would highly suggest you don’t fill them all out for every post, only fill out the information strictly related to the topic at hand.
Frequently Asked Questions
“Before I activated your plugin I checked the HTML source code for the xmlns:og and xmlns:fb namespaces and didn’t see them so I left the “Disabled Namespace” option unselected and re-checked after the plugin was activated but the xmlns:og and xmlns:fb namespaces were still not there. How do I fix This?”
Sometimes theme authors will not include the WordPress language_attributes() function inside the html tag of your theme, what you need to do is to go into Appearance -> Editor in your WordPress administration panel and from the list on the right hand side click the “Header” or “header.php” link. This will open up that file in the editor. After that near the top locate the tag that starts with <html and make sure it looks like the code below.
<html <?php language_attributes(); ?>>
It’s ok if it’s not exactly the same, you basically just need to make sure the part of it is in-between the opening and closing brackets.
“I’ve added your plugin to my site is there anything else I need to do to get my content on Facebook?”
Actually there is, you have to have the Facebook “Like”, “Recommend” or “Connect” button somewhere on your website on each post/page. In order for Facebook to pick up your content you have to have this plugin installed and a Facebook user has to visit your website and essentially like or recommend the post/page or main site. Only then will the content be displayed on Facebook. Additionally Facebook may not always add your content to a users “Likes” or “Interests” section, Facebook reserves the right to do to this at their own discretion but without the plugin or the like buttons you can rest assured they’ll never index your content.
“Are there any additional benefits to having my content part of the Open Graph?”
Well there is one and that is better statistics, each piece of content Facebook pics up will act like a Facebook page, enabling you to go into your Facebook Insights and see specific demographics about the users who like your content, things like there age and gender. Below is a screenshot that show’s some of the additional insights you can get by using this plugin.
I’m going to be making various updates to the plugins soon, removing some of the old bizzyLabs references and updating the links, I’ll eventually bring back additional language support and fix up some known bugs but if you have any features you would like to see me implement, any issues with the plugin, or any thoughts you might have regarding this plugin, then by all means feel free to leave them in the comments below and I’ll get back to you as soon as I can.