<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to generate image_src for Facebook links in WordPress theme</title>
	<atom:link href="http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/</link>
	<description>Team leader and Software engineer</description>
	<lastBuildDate>Mon, 12 Dec 2011 00:46:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: tiggsy</title>
		<link>http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/comment-page-1/#comment-986</link>
		<dc:creator>tiggsy</dc:creator>
		<pubDate>Fri, 04 Nov 2011 21:39:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.radupoenaru.com/?p=1203#comment-986</guid>
		<description>I guess it&#039;s my nonstandard setup (Ubuntu 10..04 +Firefox 8.0) but the italicized paragraphs are half off the screen so can&#039;t be read without copying and pasting them somewhere else.

But who uses pictures so small FB will accept them? How do you get round the problem of either serving tiny pics to make your visitors have a bad experience, or facebook getting the images it likes?</description>
		<content:encoded><![CDATA[<p>I guess it&#8217;s my nonstandard setup (Ubuntu 10..04 +Firefox 8.0) but the italicized paragraphs are half off the screen so can&#8217;t be read without copying and pasting them somewhere else.</p>
<p>But who uses pictures so small FB will accept them? How do you get round the problem of either serving tiny pics to make your visitors have a bad experience, or facebook getting the images it likes?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lelebart</title>
		<link>http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/comment-page-1/#comment-949</link>
		<dc:creator>lelebart</dc:creator>
		<pubDate>Thu, 16 Sep 2010 22:01:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.radupoenaru.com/?p=1203#comment-949</guid>
		<description>Hi, i&#039;ve made a little mod of your (great) code, in order to catch the thumbnail if the post had one, then add a default image if none or if it is a different page. &lt;pre class=&quot;brush: php&quot;&gt;//thumb for facebook based on http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/
function add_image_src(){
    global $post; // get the global variable post
    if ($post){ // if it exists and is only a single post
        if (function_exists(&#039;has_post_thumbnail&#039;) &amp;&amp; has_post_thumbnail($post-&gt;ID)) { // maybe the post has a thumbnail
            $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post-&gt;ID)); // based on add-image-src-meta-tag plugin
            echo &quot;\t\n&quot;;
        } else { // pattern for recognizing first image in post
            $pattern = &#039;!post_content, $matches);
            $image_src = $matches[&#039;1&#039;][0]; // first image would be the representative image
            if ($image_src) { // extract it as Facebook wants it
                echo &quot;\t\n&quot;; }
            else { // then the post has no image
                echo &quot;\t\n&quot;; } // by lelebart
        }
    } else {
        echo &quot;\t\n&quot;; // by lelebart
    }
}
add_action(&#039;wp_head&#039;, &#039;add_image_src&#039;);&lt;/pre&gt;
i&#039;m not expert to make a plugin, maybe you&#039;re able to do that: set a default image via the admin interface, not just have a &quot;fb_logo.png&quot; on the courrent theme.
best regards, Valerio
(sorry for my bad english, hope you understand anyway)</description>
		<content:encoded><![CDATA[<p>Hi, i&#8217;ve made a little mod of your (great) code, in order to catch the thumbnail if the post had one, then add a default image if none or if it is a different page.
<pre class="brush: php">//thumb for facebook based on <a href="http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/" rel="nofollow">http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/</a>
function add_image_src(){
    global $post; // get the global variable post
    if ($post){ // if it exists and is only a single post
        if (function_exists('has_post_thumbnail') &amp;&amp; has_post_thumbnail($post-&gt;ID)) { // maybe the post has a thumbnail
            $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post-&gt;ID)); // based on add-image-src-meta-tag plugin
            echo "\t\n";
        } else { // pattern for recognizing first image in post
            $pattern = '!post_content, $matches);
            $image_src = $matches['1'][0]; // first image would be the representative image
            if ($image_src) { // extract it as Facebook wants it
                echo "\t\n"; }
            else { // then the post has no image
                echo "\t\n"; } // by lelebart
        }
    } else {
        echo "\t\n"; // by lelebart
    }
}
add_action('wp_head', 'add_image_src');</pre>
<p>i&#8217;m not expert to make a plugin, maybe you&#8217;re able to do that: set a default image via the admin interface, not just have a &#8220;fb_logo.png&#8221; on the courrent theme.<br />
best regards, Valerio<br />
(sorry for my bad english, hope you understand anyway)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WordPressハッカーズ</title>
		<link>http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/comment-page-1/#comment-340</link>
		<dc:creator>WordPressハッカーズ</dc:creator>
		<pubDate>Sat, 15 May 2010 07:05:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.radupoenaru.com/?p=1203#comment-340</guid>
		<description>&lt;strong&gt;How to generate image_src for Facebook links in Wordpress theme &#124; Radu Poenaru...&lt;/strong&gt;

この記事は以下サイトで紹介されています。 WordPressハッカーズ...</description>
		<content:encoded><![CDATA[<p><strong>How to generate image_src for Facebook links in WordPress theme | Radu Poenaru&#8230;</strong></p>
<p>この記事は以下サイトで紹介されています。 WordPressハッカーズ&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Generate Facebook image_src meta tag in Wordpress &#124; WithExample</title>
		<link>http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/comment-page-1/#comment-339</link>
		<dc:creator>Generate Facebook image_src meta tag in Wordpress &#124; WithExample</dc:creator>
		<pubDate>Sat, 17 Apr 2010 06:51:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.radupoenaru.com/?p=1203#comment-339</guid>
		<description>[...] Generate Facebook image_src meta tag in Wordpress  April 17, 2010 &#124; Posted by admin  http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/ [...]</description>
		<content:encoded><![CDATA[<p>[...] Generate Facebook image_src meta tag in WordPress  April 17, 2010 | Posted by admin  <a href="http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/" rel="nofollow">http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anthon</title>
		<link>http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/comment-page-1/#comment-338</link>
		<dc:creator>anthon</dc:creator>
		<pubDate>Sat, 17 Apr 2010 05:24:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.radupoenaru.com/?p=1203#comment-338</guid>
		<description>HI , 

Do you have any idea, what is the coding for flash embedded .

Thank you.</description>
		<content:encoded><![CDATA[<p>HI , </p>
<p>Do you have any idea, what is the coding for flash embedded .</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anthon</title>
		<link>http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/comment-page-1/#comment-337</link>
		<dc:creator>anthon</dc:creator>
		<pubDate>Mon, 12 Apr 2010 12:23:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.radupoenaru.com/?p=1203#comment-337</guid>
		<description>HI, 

I just follow steps above and copy the suggested code in to  my header.php

on my blog home getting code :
$id =$post-&gt;ID; $the_content =$wpdb-&gt;get_var(&quot;SELECT post_content FROM $wpdb-&gt;posts WHERE ID = $id&quot;); $pattern = &#039;!&#039;; 

any suggestion .

thank you
best regards
Anthony</description>
		<content:encoded><![CDATA[<p>HI, </p>
<p>I just follow steps above and copy the suggested code in to  my header.php</p>
<p>on my blog home getting code :<br />
$id =$post-&gt;ID; $the_content =$wpdb-&gt;get_var(&#8220;SELECT post_content FROM $wpdb-&gt;posts WHERE ID = $id&#8221;); $pattern = &#8216;!&#8217;; </p>
<p>any suggestion .</p>
<p>thank you<br />
best regards<br />
Anthony</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->

