{"id":526,"date":"2013-11-28T03:15:04","date_gmt":"2013-11-28T03:15:04","guid":{"rendered":"http:\/\/a1webdesignteam.com\/blog\/?p=526"},"modified":"2013-11-28T03:15:04","modified_gmt":"2013-11-28T03:15:04","slug":"how-to-link-your-wordpress-site-to-facebook","status":"publish","type":"post","link":"https:\/\/a1webdesignteam.com\/blog\/how-to-link-your-wordpress-site-to-facebook\/","title":{"rendered":"How to Link Your WordPress Site to Facebook"},"content":{"rendered":"<p>Many WordPress bloggers like to be the original sharer of their newly posted content. They may share it to Facebook or any other social site like Twitter. What they essentially do is write their blog post, and then share the content on the Facebook page that was created specific for their web site. This, for the most part is a manual process. While it my be outsourced, there is a better and simpler way that is free.<\/p>\n<p><img loading=\"lazy\" alt=\"link wordpress site to facebook\" src=\"http:\/\/www.tipsandtricks-hq.com\/wp-content\/uploads\/2013\/08\/link-wordpress-to-facebook-example.jpg\" width=\"400\" height=\"139\" \/><\/p>\n<p>Automation in online marketing can be a negative thing, but there are some reasonable means for automation that don\u2019t include spamming or any non-white hat approach to marketing. Auto sharing of content can be one such example.<\/p>\n<p>While we are talking about linking our WordPress blog to Facebook in this post, this approach can be used to also share content to Twitter, Google+, LinkedIn and others. Sure, there are already ways to share content to Twitter automatically, but for the most part we haven\u2019t been able to do that for Facebook or Google+.<\/p>\n<h3>Introducing \u2018If This Then That\u2019 \u2013 Creating Recipes to Automate Tasks<\/h3>\n<p>If This Then That or IFTTT (pronounced like \u2018gift\u2019 wihtout the \u2018g\u2019) is a web site that allows you to create \u2018recipes\u2019 using specific \u2018channels.\u2019 I will provide several examples of the different parts to recipes below and then follow with the exact steps for creating one to link WordPress to Facebook.<\/p>\n<p>&nbsp;<\/p>\n<p>First, let\u2019s define the elements of the recipe. Like I mentioned there are<strong>channels<\/strong>. Examples from the growing list of channels include Facebook, Evernote, Email, Weather, LinkedIn, Craigslist, DropBox, Delicious, Flickr, RSS, Google Calendar, Stocks, Twitter, WordPress, YouTube, and more. There are currently 65 channels to choose from.<\/p>\n<p>Then we have\u00a0<strong>Triggers<\/strong>. Triggers are the actions that take place on the various channels (not all triggers have channels though). Examples of triggers include:<\/p>\n<pre>\"I am tagged in a picture on Facebook.\"\r\n\"The time is 9:10 AM Eastern Standard Time.\"\r\n\"I received an email with an attachment.\"\r\n\"It has started to rain in my city.\"\r\n\"I posted a new article to my WordPress blog.\"\r\n\"A new post that matches the query 'XXXXXXXXXX' is posted to such and such RSS feed.\"\r\n\"The Detroit Red Wings won tonight's game.\"<\/pre>\n<p>Now,\u00a0<strong>Actions<\/strong>\u00a0are part of the recipe that indicates what is done after a certain trigger. Just like triggers, many but not all, channels have \u2018actions\u2019 associated with them. Examples of exactions include:<\/p>\n<pre>\"Send me a text message.\"\r\n\"Call my phone.\"\r\n\"Create a status message on my Facebook profile.\"\r\n\"Create a photo update to my Facebook page.\"\r\n\"Save the file to my Google Drive (or DropBox) account.\"\r\n\"Add an entry to my Google Calendar.\"\r\n\"Turn off the lights in my home.\" (this one uses <em>Philips Hue<\/em> to control your lighting)<\/pre>\n<p>You get the idea. Between the sample triggers and actions you can probably see how connecting a WordPress blog (or any blog or site with an RSS feed for that matter) to a Facebook profile or page is actually quite an easy task in comparison to a lot of the other things that can be done. Like, you can have your kitchen light turned on each time the Detroit Tigers win a baseball game. Why would you? I don\u2019t know, but you can.<\/p>\n<p>Now, each channel will have\u00a0<strong>Ingredients<\/strong>. These are the values that can be extracted from a trigger and\/or added to an action. Ingredients are best illustrated with an example.<\/p>\n<p>For a given email, you may look at the \u201csubject\u201d line to match it with a certain value before applying an action. Subject is an ingredient. Others for \u201cEmail\u201d include: attachment, body, sender\u2019s address, receive date, etc.<\/p>\n<p>Putting it all together, a recipe = if\u00a0<em>trigger<\/em>, then\u00a0<em>action<\/em>. This of course means that you will need to supply IFTTT with the \u201ckeys\u201d to your social (etc) accounts to automate certain aspects of your life. If that is something that you are prepared to do then you can market online (and do other things) very efficiently.<\/p>\n<h3>Create Your First Recipe on IFTTT<\/h3>\n<p>Let\u2019s walk through the entire process for creating a recipe on IFTTT. For this example I will automate the task of sharing a new post from my WordPress blog to my Facebook page.<\/p>\n<p>1) Create an account at ifttt.com.<\/p>\n<p>2) Click on the\u00a0<strong>My Recipes<\/strong>\u00a0menu item across the top (far left menu option).<\/p>\n<p>3) Click the\u00a0<strong>Create a Recipe<\/strong>\u00a0button.<\/p>\n<p>4) Click the hyperlinked word \u201cthis\u201d in the if-this-then-that statment to add the \u201ctrigger.\u201d<\/p>\n<p>5) Choose a \u201ctrigger.\u201d In this case we will pick\u00a0<strong>WordPress<\/strong>. If it is not already activated, click the\u00a0<strong>Activate<\/strong>\u00a0button as well. Note: Both self-hosted blogs (version 3.x) and WordPress.com blogs will work with the IFTTT WordPress Channel.<\/p>\n<p>6) Enter the URL, username, and password for your WordPress blog.<\/p>\n<p>7) Click\u00a0<strong>Activate<\/strong>. Click\u00a0<strong>Done<\/strong>. Click\u00a0<strong>Continue to the next step<\/strong>.<\/p>\n<p>8) Once the WordPress channel is activated, you have two options for the \u201ctrigger.\u201d You can choose between: \u201cthis trigger fires every time you publish a new post,\u201d and \u201cthis trigger fires every time you publish a new post with a specific tag or in a specific category.\u201d<\/p>\n<p>For this example, I chose the first option since I want all posts added to my Facebook page.<\/p>\n<p>9) There is nothing specific to add in this step (like there would be for specific categories or tags), so just click the\u00a0<strong>Create Trigger<\/strong>\u00a0button.<\/p>\n<p>10) Now, click the hyperlinked word \u201cthat\u201d in the if-this-then-that statment to add the \u201caction.\u201d<\/p>\n<p>11) Choose\u00a0<strong>Facebook Pages<\/strong>\u00a0(be sure it\u2019s \u201cPages\u201d and not \u201cFacebook\u201d unless you want it to go on your personal timeline) as the Action Channel.<\/p>\n<p>12) Login to your the Facebook account that controls your Facebook page in a separate window.<\/p>\n<p>13) Click the\u00a0<strong>Activate<\/strong>\u00a0button.<\/p>\n<p>14) Click\u00a0<strong>OK<\/strong>\u00a0providing you are OK with giving IFTTT access to all that is displayed. Click\u00a0<strong>OK<\/strong>\u00a02 more times (assuming again that you agree with granting further access).<\/p>\n<p>15) Click the\u00a0<strong>Done<\/strong>\u00a0button. Click\u00a0<strong>Continue to the next step<\/strong>.<\/p>\n<p>16) Next you have the option of placing a new plain text status message, creating a link post, or adding a photo to an album. In this example I will be choosing the option:\u00a0<strong>Create a link post<\/strong>.<\/p>\n<p>17) For this action you will be creating a Link URL and Message for the link post on your Facebook page. You will be choosing from various WordPress \u201cingredients\u201d which include: Post URL (use this for Link URL), Post Title (perfect for the \u201cMessage\u201d field), Post Content (may work for \u201cMessage\u201d), First Image URL, Tags and Categories, and Post Date. Plus of course you can add your own text. You can also leave the \u201cmessage\u201d part blank as Facebook will automatically pull in some values from the blog post (namely title, image and description).<\/p>\n<p>18) Click the\u00a0<strong>Create Action<\/strong>\u00a0button.<\/p>\n<p>19) You then add a description so that you can know what it\u2019s about when looking through all your recipes later. You will also have the option to share the recipe idea publicly. You can include hash tags to allow the recipe to be found more easily. I think this step really is more for companies\/web sites creating recipes to help with some promotion for their channels (or their sites attached to the RSS channel).<\/p>\n<p>20) Click the\u00a0<strong>Create Recipe<\/strong>\u00a0button.<\/p>\n<h3>Using OpenGraph Tags When Sharing Content to Facebook<\/h3>\n<p>When sharing a link to Facebook, whether manually or automatically (as described above), Facebook will pull in certain elements from the page associated with the link. There will be a title, image, and content snippet. In many cases, Facebook makes the best guess as to what to include for those three elements.<\/p>\n<p>The title is easy and usually accurate. The image may end up being the logo or an image from an advertisement on the page and may not be relevant to the post at all. The description is often just a snippet from the page and will work in a lot of cases (but not always) but sometimes it is better to control that value as well. OpenGraph tags allow you to do that.<\/p>\n<p>Some SEO plugins (Yoast\u2019s All In One WordPress SEO plugin for example) can be used to create extra fields in the add\/edit post\/page screens in WordPress allowing you to customize those values, so that Facebook doesn\u2019t have to guess on what to use.<\/p>\n<p>There is a meta element with the propertly value of \u201cog:title\u201d that could be placed within the \u201chead\u201d tags of the HTML to indicate the title to use when sharing content to Facebook. \u201cog:description\u201d is used for the content snippet, and \u201cog:image\u201d tells Facebook what to use as the image for the post.<\/p>\n<p>It\u2019s often easiest to use a plugin for WordPress unless you are comfortable creating custom functions in that environment. The process if beyond the scope of this article but it essentially involves adding new meta boxes to a post or page edit screen, and injecting the values from that content onto it\u2019s appropriate single post page.<\/p>\n<p>There are other values that can be included for the OpenGraph, like ones to represent the site name, post URL, content type, etc, but the title, image, and description are the main three.<\/p>\n<p>Here\u2019s how they might look within the HTML source of a web page:<\/p>\n<pre>&lt;head&gt;\r\n&lt;meta property=\"og:title\" content=\"Post title used on Facebook\" \/&gt;\r\n&lt;meta property='og:image' content='http:\/\/path.to\/image.jpg'\/&gt;\r\n&lt;meta name=\"description\" content=\"Description of content that is displayed on Facebook.\"\/&gt;\r\n&lt;\/head&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Many WordPress bloggers like to be the original sharer of their newly posted content. They may share it to Facebook or any other social site like Twitter. What they essentially do is write their blog post, and then share the content on the Facebook page that was created specific for their web site. This, for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0},"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/posts\/526"}],"collection":[{"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/comments?post=526"}],"version-history":[{"count":0,"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/posts\/526\/revisions"}],"wp:attachment":[{"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/media?parent=526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/categories?post=526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/tags?post=526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}