<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WereWP &#187; facebook</title>
	<atom:link href="http://werewp.com/tag/facebook/feed/" rel="self" type="application/rss+xml" />
	<link>http://werewp.com</link>
	<description>Daily WordPress news</description>
	<lastBuildDate>Tue, 22 May 2012 16:18:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to: create a Facebook iFrame application thanks to WordPress</title>
		<link>http://werewp.com/plugins/how-to-create-a-facebook-iframe-application-thanks-to-wordpress/</link>
		<comments>http://werewp.com/plugins/how-to-create-a-facebook-iframe-application-thanks-to-wordpress/#comments</comments>
		<pubDate>Thu, 12 May 2011 18:43:15 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.werewp.com/?p=1535</guid>
		<description><![CDATA[If you are working with Facebook, you must have been slightly worried when they announced the end of the FBML for page tabs. Within a few weeks, some alternatives have been created, and you could switch from the old FBML to some new system. But to me none of these solutions seem satisfying. And let&#8217;s [...]<hr /><a href="http://wpne.ws/templatic"><img src="http://www.werewp.com/wp-content/themes/werewp/images/ads/templatic_468x60.png" alt="templatic" /></a><hr />]]></description>
			<content:encoded><![CDATA[<p>If you are working with Facebook, you must have been slightly worried when they announced the end of the FBML for page tabs. Within a few weeks, some alternatives have been created, and you could switch from the old FBML to some new system. But to me none of these solutions seem satisfying. And let&#8217;s face it, I am too much of a WordPress fan not to imagine merging the two systems. So I took the opportunity to start working on a WordPress plugin that would make creating Facebook iFrame applications dead simple for people administrating a WordPress site.</p>
<p><span id="more-1535"></span><br />
<img class="aligncenter size-full wp-image-1539" title="WordPress facebook applications plugin" src="http://www.werewp.com/wp-content/uploads/2011/05/facebook-applications.png" alt="" width="563" height="185" /><br />
After a few days of work, here is what I came up with: <strong><a title="WordPress Facebook applications plugin" href="http://wordpress.org/extend/plugins/wp-facebook-applications/" target="_blank">WP Facebook Applications</a>.</strong></p>
<p style="text-align: left;">This WordPress plugin is simple to use: download it, install it and activate it on your blog, and a new &#8220;FB Applications&#8221; menu will appear. There you can create a new page for your Facebook tab, and you are guided through the process in order to keep it as fast and as simple as possible.</p>
<p><img class="size-full wp-image-1541 " title="options-panel" src="http://www.werewp.com/wp-content/uploads/2011/05/options-panel.png" alt="" width="563" height="311" /></p>
<p>A few options are available: you define an image non fans of your page will see, then the content they will see once they &#8220;Like&#8221; your page. And you can decide to ad a Facebook comments form below that content.</p>
<p>Of course, this plugin is a work in progress: I would be happy to receive all your comments, remarks, ideas and bug reports in order to improve it and add new functionality if need. I actually have a few ideas and a small to-do list for future improvements:</p>
<ul>
<li>Limit the size of the images that are displayed on the Facebook pages</li>
<li>Translate the plugin in my mother tongue, I have been lazy and did not deal with i18n so far;</li>
<li>Somehow make it easier to create the app on Facebook&#8217;s side</li>
<li>Allow the choice between the landing page for the non-fans, or the content directly</li>
<li>Add more possibilites for other Facebook elements (like the comments)</li>
</ul>
<p>What do you think? <strong>Will you be using my plugin for your next Facebook tab?</strong></p>
<p>Useful links :</p>
<ul>
<li>Help me out with patches : <a href="https://github.com/jeherve/WP-Facebook-applications">WP-Facebook-applications sur GIThub</a></li>
<li>Download the plugin : <a href="http://wordpress.org/extend/plugins/wp-facebook-applications/" target="_blank">WP Facebook Applications sur wordpress.org</a></li>
<li>Details, more information and documentation: <a title="WP Facebook Applications documentation" href="http://www.werewp.com/my-plugins/wp-facebook-applications/">WP Facebook Applications plugin documentation</a></li>
</ul>
<p>If you want to follow the evolutions and news about the plugin, <a title="jeherve on Twitter" href="http://twitter.com/jeherve" target="_blank">follow me on Twitter</a>, or subscribe to this blog!</p>
]]></content:encoded>
			<wfw:commentRss>http://werewp.com/plugins/how-to-create-a-facebook-iframe-application-thanks-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to: add Like button to WordPress pages</title>
		<link>http://werewp.com/tutorials/how-to-add-like-button-to-wordpress-pages/</link>
		<comments>http://werewp.com/tutorials/how-to-add-like-button-to-wordpress-pages/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 17:49:18 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[graph api]]></category>
		<category><![CDATA[like]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.werewp.com/?p=1418</guid>
		<description><![CDATA[In a comment on my older post explaining how to integrate Facebook Like button into your WordPress theme, Mike was asking how to add the button into pages, instead of posts like I had explained. In that post I will propose a solution to solve that issue. The issue with the previous tutorial was with [...]<hr /><a href="http://wpne.ws/templatic"><img src="http://www.werewp.com/wp-content/themes/werewp/images/ads/templatic_468x60.png" alt="templatic" /></a><hr />]]></description>
			<content:encoded><![CDATA[<p>In a comment on my older post explaining <a title="How to integrate the Like Button into your WordPress theme" href="http://www.werewp.com/wordpress/how-to-integrate-facebook-open-graph-protocol-into-your-wordpress-theme/" target="_self">how to integrate Facebook Like button into your WordPress theme</a>, <a title="How to integrate the Like button into pages" rel="nofollow" href="http://www.werewp.com/wordpress/how-to-integrate-facebook-open-graph-protocol-into-your-wordpress-theme/comment-page-1/#comment-11708" target="_self">Mike</a> was asking how to add the button into pages, instead of posts like I had explained. In that post I will propose a solution to solve that issue.</p>
<p><span id="more-1418"></span>The issue with the previous tutorial was with the code included in the header: it creates custom metadata for all posts, <strong>but not for pages</strong>. In order to address that problem, we simply have to add one more condition to the header:</p>
<pre class="brush: php; title: ; notranslate">
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xmlns:fb=&quot;http://www.facebook.com/2008/fbml&quot; xmlns:og=&quot;http://opengraphprotocol.org/schema/&quot; &lt;?php language_attributes(); ?&gt;&gt;
&lt;?php if (have_posts()):while(have_posts()):the_post();endwhile;endif;?&gt;
&lt;!-- Facebook Opengraph --&gt;
	&lt;meta property=&quot;fb:app_id&quot; content=&quot;your_app_id&quot; /&gt;
	&lt;meta property=&quot;fb:admins&quot; content=&quot;your_admin_id&quot; /&gt;
	&lt;meta property=&quot;og:url&quot; content=&quot;&lt;?php the_permalink() ?&gt;&quot;/&gt;
&lt;?php if (is_single()) { ?&gt;
	&lt;meta property=&quot;og:title&quot; content=&quot;&lt;?php single_post_title(''); ?&gt;&quot; /&gt;
	&lt;meta property=&quot;og:description&quot; content=&quot;&lt;?php echo strip_tags(get_the_excerpt($post-&gt;ID)); ?&gt;&quot; /&gt;
	&lt;meta property=&quot;og:type&quot; content=&quot;article&quot; /&gt;
	&lt;meta property=&quot;og:image&quot; content=&quot;&lt;?php echo wp_get_attachment_thumb_url( get_post_thumbnail_id( $post-&gt;ID ) ) ?&gt;&quot; /&gt;
&lt;?php } elseif (is_page()) { ?&gt;
	&lt;meta property=&quot;og:title&quot; content=&quot;&lt;?php single_post_title(''); ?&gt;&quot; /&gt;
	&lt;meta property=&quot;og:type&quot; content=&quot;article&quot; /&gt;
	&lt;meta property=&quot;og:description&quot; content=&quot;&lt;?php echo(get_post_meta($post-&gt;ID, &quot;metadescription&quot;, true)); ?&gt;&quot; /&gt;
	&lt;meta property=&quot;og:image&quot; content=&quot;&lt;?php echo(get_post_meta($post-&gt;ID, &quot;thumburl&quot;, true)); ?&gt;&quot; /&gt;
&lt;?php } else { ?&gt;
	&lt;meta property=&quot;og:site_name&quot; content=&quot;&lt;?php bloginfo('name'); ?&gt;&quot; /&gt;
	&lt;meta property=&quot;og:description&quot; content=&quot;&lt;?php bloginfo('description'); ?&gt;&quot; /&gt;
	&lt;meta property=&quot;og:type&quot; content=&quot;website&quot; /&gt;
	&lt;meta property=&quot;og:image&quot; content=&quot;&lt;?php bloginfo('template_url') ?&gt;/path/to-your/logo.jpg&quot; /&gt;
&lt;?php } ?&gt;
</pre>
<p>This solution makes use of the <a title="WordPress custom fields" href="http://codex.wordpress.org/Custom_Fields" target="_blank">custom fields</a> which allow you to add metadata into each post or page. It means that you will have to specifyeach metadata manually for each page, but that&#8217;s something you should already be doing for the metadescriptions of your pages anyway! ;)</p>
<h3>Fill in the metadata in your admin panel</h3>
<p>The custom field panel should appear at the bottom of your edit panel y default. If not, check the box in the screen options and the panel should appear. Then, you only have to fill in the info like I have done on the screenshot below.<br />
<a href="http://www.werewp.com/wp-content/uploads/2010/10/custom-fields.png"><img class="aligncenter size-medium wp-image-1425" title="custom-fields" src="http://www.werewp.com/wp-content/uploads/2010/10/custom-fields-300x95.png" alt="" width="300" height="95" /></a><br />
The key name you use for each value only depends on what you set in the header. In our case, I have used &#8220;metadescription&#8221; for the description and &#8220;thumburl&#8221; for the image path.</p>
<h3>Another way of handling images</h3>
<p>As you may have seen on the code snippet above, there is a different way of creating the image thumbnail for posts and for pages. You can in fact use either of these techniques; one uses <em>the_post_thumbnail</em> function introduced with WordPress 2.9, the other makes use of the custom fields.</p>
<ul>
<li>the_post_thumbnail</li>
</ul>
<pre class="brush: php; title: ; notranslate">
&lt;meta property=&quot;og:image&quot; content=&quot;&lt;?php echo wp_get_attachment_thumb_url( get_post_thumbnail_id( $post-&gt;ID ) ) ?&gt;&quot; /&gt;
</pre>
<ul>
<li>custom fields</li>
</ul>
<pre class="brush: php; title: ; notranslate">
&lt;meta property=&quot;og:image&quot; content=&quot;&lt;?php echo(get_post_meta($post-&gt;ID, &quot;thumburl&quot;, true)); ?&gt;&quot; /&gt;
</pre>
<h3>And voilà !</h3>
<p>That should be it. No need to worry about pages anymore. I would furthermore suggest you to use the same technique to define custom meta descriptions and keywords for each of your pages. That can help your SEO to have unique descriptions for each page.</p>
<p>Of course, if you know of another method, do not hesitate to let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://werewp.com/tutorials/how-to-add-like-button-to-wordpress-pages/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>How to: integrate Facebook videos on your WordPress blog</title>
		<link>http://werewp.com/tutorials/how-to-integrate-facebook-videos-on-your-wordpress-blog/</link>
		<comments>http://werewp.com/tutorials/how-to-integrate-facebook-videos-on-your-wordpress-blog/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 13:11:20 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.werewp.com/?p=1322</guid>
		<description><![CDATA[Facebook is getting more and more popular everywhere on the net. Thanks to the Like button and other Facebook plugins, we can now interact and share content directly from all kinds of websites to Facebook. But what about embedding videos from Facebook to your website? We have discussed about the integration of the Open Graph [...]<hr /><a href="http://wpne.ws/templatic"><img src="http://www.werewp.com/wp-content/themes/werewp/images/ads/templatic_468x60.png" alt="templatic" /></a><hr />]]></description>
			<content:encoded><![CDATA[<p>Facebook is getting more and more popular everywhere on the net. Thanks to the Like button and other Facebook plugins, we can now interact and share content directly from all kinds of websites to Facebook. But what about embedding videos from Facebook to your website?<br />
We have discussed about the <a title="How to integrate Facebook connect on your blog" href="http://www.werewp.com/wordpress/how-to-integrate-facebook-open-graph-protocol-into-your-wordpress-theme/" target="_self">integration of the Open Graph and Facebook connect</a> earlier on this blog, but today I would like to show you how to embed a Facebook video, without having to copy and paste lines of code into your editor.</p>
<p><span id="more-1322"></span></p>
<p>For that, we will make use of the <a title="Shortcodes explained on the WordPress codex" href="http://codex.wordpress.org/Shortcode_API" target="_blank">WordPress shortcodes</a>, that are a great and easy way to add features to your blog without having to install a plugin.<br />
The idea is quite simple: we have a look at how Facebook videos are created, and then we replicate the embedding into a new shortcode.</p>
<p>Facebook videos have a unique id, that you can find in your address bar when viewing a video on Facebook. That&#8217;s the only element you will need to embed a Facebook video.</p>
<h2>Adding the shortcode to your theme</h2>
<p>In order to add the functionnality to your WordPress install, you will need to add a few lines of code to the functions.php file of your theme. If you do not have such a file, create it. This is easy to do and friendly to <a target="_blank" href="http://www.webhostgear.com/reseller-hosting.php">reseller hosting</a> or any hosts for that matter.</p>
<p>Here is the function:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

//Facebook Video Shortcode
function werewp_fn_fbvideo($atts, $content = null) {
   extract(shortcode_atts(array(
      &quot;id&quot; =&gt; '',
   ), $atts));
   return '&lt;object width=&quot;400&quot; height=&quot;224&quot; &gt;
   &lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;
   &lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;
   &lt;param name=&quot;movie&quot; value=&quot;http://www.facebook.com/v/'.$id.'&quot; /&gt;
   &lt;embed src=&quot;http://www.facebook.com/v/'.$id.'&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;400&quot; height=&quot;224&quot;&gt;
   &lt;/embed&gt;
   &lt;/object&gt;';
}
add_shortcode(&quot;fbvideo&quot;, &quot;werewp_fn_fbvideo&quot;);

?&gt;
</pre>
<p>Add it to your file, save, and upload to your server. You&#8217;re done!</p>
<h2>Display the video on your blog</h2>
<p>Let&#8217;s take the example of the video of the latest addition to Facebook services, <a title="Facebook places" href="http://www.facebook.com/places/" target="_blank">FB Places</a>. The URL of the video is as follows: <a title="Facebook Places video" href="http://www.facebook.com/video/video.php/?v=10150257497405484" target="_blank">http://www.facebook.com/video/video.php/?v=10150257497405484</a></p>
<p><a title="Facebook Places video" href="http://www.facebook.com/video/video.php/?v=10150257497405484" target="_blank"></a><br />
The only thing you will need to insert that video on your blog is the id at the end of the URL: <strong>10150257497405484</strong>.</p>
<p>Then, in your visual editor, simply <strong>add </strong><strong>the shortcode fbvideo</strong> where you want your video to appear. Of course, replace the ID by whatever video id you would like to diplay!</p>
<pre class="brush: php; title: ; notranslate">
fbvideo id=&quot;10150257497405484&quot;]
</pre>
<p>And that&#8217;s how it should look! Happy blogging, with one more <a title="Facebook WordPress tutorials" href="http://www.werewp.com/tag/facebook/" target="_self">Facebook</a> feature on your blog!</p>
<p style="text-align: center;"><object width="400" height="224" >
   <param name="allowfullscreen" value="true" />
   <param name="allowscriptaccess" value="always" />
   <param name="movie" value="http://www.facebook.com/v/10150257497405484" />
   <embed src="http://www.facebook.com/v/10150257497405484" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="224">
   </embed>
   </object></p>
]]></content:encoded>
			<wfw:commentRss>http://werewp.com/tutorials/how-to-integrate-facebook-videos-on-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to: integrate Facebook Open Graph Protocol into your WordPress theme</title>
		<link>http://werewp.com/wordpress/how-to-integrate-facebook-open-graph-protocol-into-your-wordpress-theme/</link>
		<comments>http://werewp.com/wordpress/how-to-integrate-facebook-open-graph-protocol-into-your-wordpress-theme/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 21:08:53 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[open graph]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.werewp.com/?p=1230</guid>
		<description><![CDATA[A few months ago, Facebook team uncovered a new major addition of the Facebook API: the support of the Open Graph protocol. Open Graph is not new but the possibility to use it to connect your website to Facebook certainly help it to get more popular. To put it simple, by adding different meta tags [...]<hr /><a href="http://wpne.ws/templatic"><img src="http://www.werewp.com/wp-content/themes/werewp/images/ads/templatic_468x60.png" alt="templatic" /></a><hr />]]></description>
			<content:encoded><![CDATA[<p>A few months ago, Facebook team uncovered a new major addition of the Facebook API: the support of the Open Graph protocol. Open Graph is not new but the possibility to use it to connect your website to Facebook certainly help it to get more popular.</p>
<p>To put it simple, by adding different meta tags into the head of your page, you give out information about the specific content you deliver, and all Facebook services, such as the share feature or the Like button, will make good use of this information. In the same way, Facebook uses these tags into profile pages, fan pages and applications.</p>
<p><span id="more-1230"></span></p>
<h2>What are the necessary tags to add to your page ?</h2>
<p>Here are all the tags needed:</p>
<ul>
<li><strong>Title</strong>: speaks fr itself, it is the title of your page or your article. This title will appear as title when people will share your article on Facebook, or like it.</li>
<li><strong>Description</strong>: this part will appear as the default description text when people will share your article on Facebook. In WordPress, the best is here to use different descriptions according to the page you are browsing.</li>
<li><strong>Type</strong>: this defines the category of the information you provide on your site. <a title="Open Graph Types" href="http://ogp.me/#types" target="_blank">Types are defined in the Open Graph protocol</a>, and for websites three types exist: Blog, Article, Website. In order to be precise, one solution is to define a different type if you are on the homepage or if you are browsing articles</li>
<li><strong>URL</strong>: also speaks for itself &#8211; the URL of the page.</li>
<li><strong>Image</strong>: this image will be added to the content when people share or add a comment using the FBML like button.</li>
<li><strong>Site_name</strong>: speaks for itself, it is the name of your website.</li>
</ul>
<p>To implement it within your WordPress theme, locate the <em><strong>header.php</strong></em><strong> </strong>among your theme files, and edit it with the following variables.</p>
<p>Before to edit the files, you will need the facebook admin id, which can found in the <a title="Facebook insights" href="http://www.facebook.com/insights/" target="_blank">Facebook insights page</a>, when clicking the &#8220;insights for your domain&#8221; button on the top right. You can also specify your app id, if you are using the like button for example (see paragraph below).<br />
You will also need to know the path to the main logo appearing in the header of your site. If you do not have any, I encourage you to create one, and to add into the images folder of your WordPress theme.</p>
<pre class="brush: php; title: ; notranslate">
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xmlns:fb=&quot;http://www.facebook.com/2008/fbml&quot; prefix=&quot;og: http://ogp.me/ns#&quot; &lt;?php language_attributes(); ?&gt;&gt;
&lt;?php if (have_posts()):while(have_posts()):the_post();endwhile;endif;?&gt;
&lt;!-- Facebook Opengraph --&gt;
	&lt;meta property=&quot;fb:app_id&quot; content=&quot;your_app_id&quot; /&gt;
	&lt;meta property=&quot;fb:admins&quot; content=&quot;your_admin_id&quot; /&gt;
	&lt;meta property=&quot;og:url&quot; content=&quot;&lt;?php the_permalink() ?&gt;&quot;/&gt;
&lt;?php if (is_single()) { ?&gt;
	&lt;meta property=&quot;og:title&quot; content=&quot;&lt;?php single_post_title(''); ?&gt;&quot; /&gt;
	&lt;meta property=&quot;og:description&quot; content=&quot;&lt;?php echo strip_tags(get_the_excerpt($post-&gt;ID)); ?&gt;&quot; /&gt;
	&lt;meta property=&quot;og:type&quot; content=&quot;article&quot; /&gt;
	&lt;meta property=&quot;og:image&quot; content=&quot;&lt;?php echo wp_get_attachment_thumb_url( get_post_thumbnail_id( $post-&gt;ID ) ) ?&gt;&quot; /&gt;
&lt;?php } else { ?&gt;
	&lt;meta property=&quot;og:site_name&quot; content=&quot;&lt;?php bloginfo('name'); ?&gt;&quot; /&gt;
	&lt;meta property=&quot;og:description&quot; content=&quot;&lt;?php bloginfo('description'); ?&gt;&quot; /&gt;
	&lt;meta property=&quot;og:type&quot; content=&quot;website&quot; /&gt;
	&lt;meta property=&quot;og:image&quot; content=&quot;&lt;?php bloginfo('template_url') ?&gt;/path/to-your/logo.jpg&quot; /&gt;
&lt;?php } ?&gt;
</pre>
<p>Then we will add the like button to your site, to show an example of the use of Open Graph data.</p>
<h2>How to add the like button to my WordPress blog?</h2>
<p>After adding the previous information into your header, we will need to decide of a place for the Facebook like to appear, and call <a title="Add Javascript SDK to connect your site to Facebook" href="http://developers.facebook.com/docs/reference/javascript/" target="_blank">Facebook Javascript SDK</a> in order to connect our website and Facebook.*</p>
<p>Before that, you will need to create a Facebook application: no need to be afraid, it can be done in a few steps:</p>
<ul>
<li>Go to <a title="Facebook - Create an application" href="http://www.facebook.com/developers/createapp.php" target="_blank">http://www.facebook.com/developers/createapp.php</a></li>
<li>Give a name to your app, validate,</li>
<li>Copy the app ID that is given to you</li>
<li>In the Connect tab, fill in your blog&#8217;s homepage URL in the Connect URL field, and save.</li>
</ul>
<p><a href="http://www.werewp.com/wp-content/uploads/2010/06/Capture-d’écran-2010-06-02-à-22.20.15.png"><img class="aligncenter size-medium wp-image-1233" title="Connect URL" src="http://www.werewp.com/wp-content/uploads/2010/06/Capture-d’écran-2010-06-02-à-22.20.15-300x151.png" alt="Connect URL" width="300" height="151" /></a></p>
<p>Next step will be to integrate the like button to our articles. For this locate and open <strong><em>single.php</em></strong> in your theme files, and add the following where you want the button to appear. If you want it to appear right after your article content for example, locate <strong>the_content</strong> fonction, and add it after:</p>
<pre class="brush: php; title: ; notranslate">
&lt;fb:like href=&quot;&lt;?php the_permalink() ?&gt;&quot; layout=&quot;button_count&quot; show_faces=&quot;false&quot; width=&quot;450&quot; action=&quot;like&quot; colorscheme=&quot;light&quot;&gt;&lt;/fb:like&gt;
</pre>
<p>You can change the layout of that button by changing some of the parameters: have a look at the <a title="Facebook like plugin documentation" href="http://developers.facebook.com/docs/reference/plugins/like" target="_blank">Facebook like plugin page</a> for more information.</p>
<p>Then, in order to connect the like button to Facebook, we will need to add the reference to Javascript SDK to the footer of our theme*. For that, locate your <strong><em>functions.php</em></strong> file, and add the following line to it:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
// load facebook API
add_action(&quot;wp_footer&quot;, &quot;werewp_facebook_api&quot;);

function werewp_facebook_api()
{
	$fbapi =  &quot;your_app_id&quot;; // Your application ID
	echo
			&quot;&lt;div id=\&quot;fb-root\&quot;&gt;&lt;/div&gt;
			&lt;script&gt;
			  window.fbAsyncInit = function() {
			    FB.init({appId: $fbapi, status: true, cookie: true,
			             xfbml: true});
			  };
			  (function() {
			    var e = document.createElement('script'); e.async = true;
			    e.src = document.location.protocol +
			      '//connect.facebook.net/en_US/all.js';
			    document.getElementById('fb-root').appendChild(e);
			  }());
			&lt;/script&gt;
			&quot;;
}
?&gt;
</pre>
<p>*As a sidenote, if you are already using some Facebook features on your site, such as a badge for example, you will have to make some changes to that badge and use only FBML code in there, as Facebook Connect is already called now.</p>
<p>And you&#8217;re done! The necessary information is now in the header among the other meta data, the Facebook connection is made through the Javascript SDK, and the facebook like button is added with FBML code. That&#8217;s it, nothing else is needed!<br />
Let me know if it works, and share it with us in the comments! Thank you, and don&#8217;t forget to <a title="@jeherve" href="http://twitter.com/jeherve" target="_blank">follow me on Twitter</a>! ;)</p>
<p><strong>Update</strong>: Following a comment from Mike, here is an extension of that tutorial to<a href="http://www.werewp.com/tutorials/how-to-add-like-button-to-wordpress-pages/"> include descriptions and custom images for pages</a>.<br />
<a rel="nofollow" href="http://www.werewp.com/wordpress/how-to-integrate-facebook-open-graph-protocol-into-your-wordpress-theme/comment-page-1/#comment-11763">Lee H also pointed out a solution</a> for those of you who use an old version of WordPress, since the above tutorial makes use of the_post_thumbnail function introduced with WordPress 2.9.</p>
]]></content:encoded>
			<wfw:commentRss>http://werewp.com/wordpress/how-to-integrate-facebook-open-graph-protocol-into-your-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>82</slash:comments>
		</item>
		<item>
		<title>Today in WordPress world &#8211; 14/09</title>
		<link>http://werewp.com/links/links-for-2009-09-14/</link>
		<comments>http://werewp.com/links/links-for-2009-09-14/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 14:03:14 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.werewp.com/uncategorized/links-for-2009-09-14/</guid>
		<description><![CDATA[How To Integrate Facebook With WordPress « Smashing Magazine WordPress and Facebook are two widespread online tools nowadays. Luckily for all of us, Smashing Magazine proposes us plugins and tutorials to integrate Facebook with WordPress in an easy way.<hr /><a href="http://wpne.ws/templatic"><img src="http://www.werewp.com/wp-content/themes/werewp/images/ads/templatic_468x60.png" alt="templatic" /></a><hr />]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://www.smashingmagazine.com/2009/09/14/how-to-integrate-facebook-with-wordpress/">How To Integrate Facebook With WordPress « Smashing Magazine</a></div>
<div class="delicious-extended">WordPress and Facebook are two widespread online tools nowadays. Luckily for all of us, Smashing Magazine proposes us plugins and tutorials to integrate Facebook with WordPress in an easy way.</div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://werewp.com/links/links-for-2009-09-14/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

