<?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>Tom Reitz &#187; icon</title>
	<atom:link href="http://www.tom-reitz.com/tag/icon/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tom-reitz.com</link>
	<description>Tech Talk, Catholic Commentary, and American Activism</description>
	<lastBuildDate>Tue, 07 Dec 2010 09:42:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ICO images in FaceBook profile boxes</title>
		<link>http://www.tom-reitz.com/2009/02/09/ico-images-in-facebook-profile-boxes/</link>
		<comments>http://www.tom-reitz.com/2009/02/09/ico-images-in-facebook-profile-boxes/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 02:54:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[box]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[gif]]></category>
		<category><![CDATA[ico]]></category>
		<category><![CDATA[icon]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[jpg]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[profile]]></category>

		<guid isPermaLink="false">http://www.tom-reitz.com/?p=42</guid>
		<description><![CDATA[So I&#8217;ve been developing a FaceBook application, My Sites. It let&#8217;s you bookmark websites you like and share them with your friends.
The Problem
When a FaceBook application tries to add HTML to someone&#8217;s profile box, it can add images, but only in JPG, GIF, or PNG formats. For most uses this is fine, but I needed to add a favicon next [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been developing a FaceBook application, <a title="FaceBook: My Sites" href="http://apps.facebook.com/my_sites/" target="_blank">My Sites</a>. It let&#8217;s you bookmark websites you like and share them with your friends.</p>
<h3>The Problem</h3>
<p>When a FaceBook application tries to add HTML to someone&#8217;s profile box, it can add images, <em>but only in JPG, GIF, or PNG formats</em>. For most uses this is fine, but I needed to add a favicon next to each website in a list, and ICO format isn&#8217;t allowed.</p>
<h3>The Solution</h3>
<p>Using a free php class that can import ICO images to a GD image resource, I converted the favicons to PNGs. Now FaceBook is all happy. Download a ZIP of the icon class <a title="Download ICO PHP Class" href="http://www.tom-reitz.com/wp-content/uploads/2009/02/classicophp.zip" target="_self">here</a>, or directly from <a title="PHPclasses.org" href="http://www.phpclasses.org/browse/file/9705.html" target="_blank">PHPclasses.org</a>.</p>
<p>[<strong>EDIT</strong>: please see my post on the <a title="PHP ICO to PNG conversion" href="/2009/02/17/php-ico-to-png-conversion/" target="_self"><strong>important bug fix</strong></a>]</p>
<h3>The Code</h3>
<p>Here&#8217;s how you use the class:</p>
<blockquote>
<pre><span style="font-size: small;">
&lt;?php
error_reporting(0);
require("ico.class.php");
$f = "http://www.google.com/favicon.ico";
$i = new Ico($f);
if(!($r=$i-&gt;GetIcon(0))) die("Could not load ICO.");
else {
          header("Content-Type: image/png");
          imagepng($r);
}
?&gt;
</span></pre>
</blockquote>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.tom-reitz.com%2F2009%2F02%2F09%2Fico-images-in-facebook-profile-boxes%2F&amp;linkname=ICO%20images%20in%20FaceBook%20profile%20boxes"><img src="/wp-content/themes/organic-theme/img/share_save.gif" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.tom-reitz.com/2009/02/09/ico-images-in-facebook-profile-boxes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

