<?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>Stofko Web Design &#187; Profile box</title>
	<atom:link href="http://stofko.ca/tag/profile-box/feed/" rel="self" type="application/rss+xml" />
	<link>http://stofko.ca</link>
	<description></description>
	<lastBuildDate>Wed, 26 May 2010 12:02:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Facebook Profile Boxes &#8211; Image Issues</title>
		<link>http://stofko.ca/facebook-profile-boxes-image-issues/</link>
		<comments>http://stofko.ca/facebook-profile-boxes-image-issues/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 14:11:08 +0000</pubDate>
		<dc:creator>Bev</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Profile box]]></category>

		<guid isPermaLink="false">http://stofko.ca/?p=65</guid>
		<description><![CDATA[Facebook image caching not reliable.]]></description>
			<content:encoded><![CDATA[<p>Facebook profile boxes are a great way for an application to improve the user experience and also provide publicity for the application. However, it is not so great when the profile box consists of a bunch of broken links to missing images.</p>
<p>There are currently <a title="Facebook Image Caching bugs" href="http://bugs.developers.facebook.com/buglist.cgi?product=Facebook%20Platform&amp;component=Image%20caching&amp;bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED" target="_blank">29 bugs</a> reported against the Facebook image caching mechanism. Some of these problems have been around for over a year, so there is valid reason to be concerned.</p>
<p>Fortunately there is a method you can use that forces Facebook to re-cache your image when calling setFBML.</p>
<p><span id="more-65"></span></p>
<p>By appending the current time to the image name, Facebook believes the image to be new and saves it as a new image.</p>
<p class="codebox"><code>&lt;img src="http://www.mysite.com/images/image.jpg?refresh=&lt;? echo time(); ?&gt;" /&gt;</code></p>
<p>Use this on all your profile box images to ensure you always have valid content displayed.</p>
]]></content:encoded>
			<wfw:commentRss>http://stofko.ca/facebook-profile-boxes-image-issues/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Facebook Profile Boxes</title>
		<link>http://stofko.ca/new-facebook-profile-boxes/</link>
		<comments>http://stofko.ca/new-facebook-profile-boxes/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 14:55:22 +0000</pubDate>
		<dc:creator>Bev</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Profile box]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://stofko.ca/?p=4</guid>
		<description><![CDATA[This tutorial describes how to support the Facebook profile box on the user's Wall tab using the PHP library.]]></description>
			<content:encoded><![CDATA[<p>Facebook has fully launched its new profile, forcing application developers to revisit the coding of a profile box. Fortunately, without making any changes whatsoever, the old style profile boxes will appear successfully on the Boxes tab.</p>
<p>However, for those application developers who want to go one step further, here is a description of how to support the profile box on the user&#8217;s Wall tab using the PHP library.</p>
<p><span id="more-4"></span></p>
<h4>1. Client Library</h4>
<p>First, make sure you have the latest client library. Visit the the <a title="Facebook Client Library Wiki Page" href="http://wiki.developers.facebook.com/index.php/PHP" target="_blank">Facebook client library wiki page </a>for more information and a link to the download. Note that this library drops support for some old functions such as require_add, so if you haven&#8217;t kept your application up-to-date now is the time to do so. The PHP 5 version of the library contains the call you need. If you are using PHP 4 then you need to manually update the library call to look like this:</p>
<p class="codebox"><code>function profile_setFBML($markup, $uid = null, $profile=”, $profile_action=”, $mobile_profile=”, $profile_main=”) {<br />
return $this-&gt;call_method(’facebook.profile.setFBML’, array(’markup’ =&gt; $markup,<br />
‘uid’ =&gt; $uid,<br />
‘profile’ =&gt; $profile,<br />
‘profile_action’ =&gt; $profile_action,<br />
‘mobile_profile’ =&gt; $mobile_profile,<br />
‘profile_main’ =&gt; $profile_main));</code></p>
<h4>2. Reset FBML</h4>
<p>For the profile box to appear on the Wall tab you must load the <a href="http://wiki.developers.facebook.com/index.php/FBML">FBML </a>that will appear there. This is done using the same function that was used to load the old-style profile, only now there is a new parameter &#8220;profile_main&#8221;. In PHP, use the following code to load the profile boxes:</p>
<p class="codebox"><code>$fbml = "&lt;fb:wide&gt;This is a wide profile box on the Boxes tab.&lt;/fb:wide&gt;";<br />
$fbml .= "&lt;fb:narrow&gt;This is a narrow profile box on the Boxes tab.&lt;/fb:narrow&gt;";<br />
$fbml_main = "This is the Wall tab profile data";<br />
$result = $facebook-&gt;api_client-&gt;profile_setFBML(NULL, $user_id, $fbml, NULL, NULL, $fbml_main);<br />
echo "set FBML: result = ".var_export($result,true);<br />
</code></p>
<p>If your return code is NULL, all is well. If not, check the return codes documented on the <a href="http://wiki.developers.facebook.com/index.php/Profile.setFBML">wiki page</a>.</p>
<h4>3. Add to Profile Button</h4>
<p>If you want to make it really easy for the user, program an &#8220;Add to Profile&#8221; button to appear on a canvas page. If the user has not yet added a profile box (on the Boxes or Wall tabs) and the FBML for profile_main was successfully loaded in step 2 then the button will appear. If there is already a profile box displayed, then the button will not appear. The code for the button is simple:</p>
<p class="codebox"><code>&lt;fb:add-section-button section="profile" /&gt;<br />
</code></p>
<p>Note this cannot appear within the dashboard.</p>
<p>That&#8217;s it! You should now have the ability to display a profile box on either the Wall tab or the Boxes tab.</p>
]]></content:encoded>
			<wfw:commentRss>http://stofko.ca/new-facebook-profile-boxes/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>
