<?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"
	>

<channel>
	<title>Andrew Sellick &#187; Facebook</title>
	<atom:link href="http://www.andrewsellick.com/category/facebook/feed" rel="self" type="application/rss+xml" />
	<link>http://www.andrewsellick.com</link>
	<description>andrewsellick.com</description>
	<pubDate>Sat, 15 Nov 2008 00:35:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>facebook application development part one</title>
		<link>http://www.andrewsellick.com/81/facebook-application-development-part-one</link>
		<comments>http://www.andrewsellick.com/81/facebook-application-development-part-one#comments</comments>
		<pubDate>Thu, 06 Dec 2007 23:34:36 +0000</pubDate>
		<dc:creator>andy</dc:creator>
		
		<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://www.andrewsellick.com/81/facebook-application-development-part-one</guid>
		<description><![CDATA[Well it&#8217;s been a while since I promised a Facebook tutorial and finally it is here.&#160;Well Part One at least.&#160;:-)

In this first part I will go through the process of creating a very simple Facebook application focusing on the adding the application and the embedded profile application itself.

I will be using PHP5 throughout the course [...]]]></description>
			<content:encoded><![CDATA[<div><span>Well it&rsquo;s been a while since I promised a Facebook tutorial and finally it is here.&nbsp;Well Part One at least.&nbsp;:-)</span></div>
<div>
<span>In this first part I will go through the process of creating a very simple Facebook application focusing on the adding the application and the embedded profile application itself.</span></div>
<div>
<span>I will be using PHP5 throughout the course of this tutorial in conjunction with the Facebook PHP5 Client Library.</span></div>
<h3><span>download the facebook client library</span>&nbsp;</h3>
<div><a href="http://developers.facebook.com/clientlibs/facebook-platform.tar.gz" target="_blank">Download the PHP5 Client Library</a>.</div>
<div>
<h3>tutorial</h3>
</div>
<p><span>Once you have download the Facebook Client Library and extracted the contents you will be presented with a facebook-platform folder and within this a client folder (The PHP 5 client and the code base we will be using for this tutorial), footprints (A Facebook demo application) and a php4client folder (The PHP 4 client).</span>&nbsp;</p>
<p><span>To start off with we will create a folder called &ldquo;tutorial&rdquo; within the root &ldquo;facebook-platform&rdquo; folder.</span></p>
<p><span>Next we need to create to PHP files; index.php and config.inc.php.&nbsp;The contents of these files are displayed below:</span>&nbsp;</p>
<div>
<h3><strong>index.php</strong></h3>
</div>
<p><span>The index.php provides the foundation for the entire application.&nbsp;This is where the initial add page is created along with the embedded application.</span></p>
<div>&nbsp;</div>
<ol type="1" style="margin-top: 0cm;" start="1">
<li><span>First of all we need to include the facebook client library and      the config.inc.php.</span></li>
</ol>
<div class="code">// the facebook client library<br />
include_once &#8216;../client/facebook.php&#8217;;</p>
<p>// this defines some of your basic setup<br />
include_once &#8216;config.inc.php&#8217;;</div>
<ol type="1" style="margin-top: 0cm;" start="2">
<li><span>Next we instantiate an instance of the facebook class and force      the user authentication before logging in.</span></li>
</ol>
<div class="code">$facebook = new Facebook($api_key, $secret);<br />
$facebook-&gt;require_frame();<br />
$user = $facebook-&gt;require_login();</div>
<ol type="1" style="margin-top: 0cm;" start="3">
<li><span>Now we create an add application screen to be initially      displayed when a user clicks to see your applications hompage.&nbsp;This code includes two simple facebook      variables to display the users facebook username and to add the facebook      add url for the application.</span></li>
</ol>
<div class="code">&lt;div style=&quot;padding: 10px;background-color:#FFFFFF;&quot;&gt;<br />
&nbsp; &lt;h2 style=&quot;font-family:arial;font-size:14px;&quot;&gt;Hi &lt;fb:name firstnameonly=&quot;true&quot; uid=&quot;&lt;?=$user?&gt;&quot; useyou=&quot;false&quot;/&gt;!&lt;/h2&gt;&lt;br/&gt;<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&lt;div style=&quot;width:255px;float:left;border-right:1px solid #FFFFFF;background-color:#333333;height:100px;padding: 10px;&quot;&gt;&lt;a href=&quot;http://www.andrewsellick.com&quot;&gt;&lt;img src=&quot;http://news.andrewsellick.com/facebook-platform/asellick/images/logo.gif&quot; alt=&quot;AndrewSellick.com&quot; title=&quot;AndrewSellick.com&quot; style=&quot;border:0px solid #FFFFFF;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&lt;div style=&quot;width:330px;float:left;background-color:#333333;height:70px;color:#FFFFFF;padding: 25px 10px 25px 10px;font-family:arial;&quot;&gt;<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;p style=&quot;margin:0px 0px 8px 0px;&quot;&gt;Welcome to the AndrewSellick.com Facebook App.&nbsp; If you want to know all the latest news on AndrewSellick.com feel free to add this application to your profile.&lt;/p&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;p style=&quot;margin:0px 0px 0px 0px;&quot;&gt; &lt;a style=&quot;color:#FFFFFF;text-decoration:underline;&quot; href=&quot;&lt;?= $facebook-&gt;get_add_url() ?&gt;&quot;&gt;Add AndrewSellick.com&lt;/a&gt;.&nbsp;&nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Enjoy&#8230;&lt;/p&gt;<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&lt;/div&gt;<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&lt;div style=&quot;clear: both;&quot;/&gt;<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp; &lt;p&gt;&lt;a href=&quot;&lt;?= $facebook-&gt;get_add_url() ?&gt;&quot;&gt;Put AndrewSellick.com in your profile&lt;/a&gt;, if you haven&#8217;t already!&lt;/p&gt;<br />
&nbsp; &nbsp;<br />
&nbsp; &lt;div style=&quot;clear: both;&quot;/&gt;<br />
&lt;/div&gt;</div>
<ol type="1" style="margin-top: 0cm;" start="4">
<li><span>Finally we create the FBML code.&nbsp;This is the code that will be displayed      for the embedded application.&nbsp;The      code is very simple and is added using a Facebook Client API call $facebook-&gt;api_client-&gt;profile_setFBML();&nbsp;This set the FBML when the Facebook      application is added.</span></li>
</ol>
<div class="code">&lt;?php </p>
<p>&nbsp;&nbsp; &nbsp;// Create the FBML code for the embeded application<br />
&nbsp;&nbsp; &nbsp;$fbml .= &#8216;&lt;div style=&quot;width:100%;&quot;&gt;&#8217;;<br />
&nbsp;&nbsp; &nbsp;$fbml .= &#8216;&lt;div style=&quot;width:133px;float:left;border-right:1px solid #FFFFFF;background-color:#333333;height:100px;padding: 10px;&quot;&gt;&lt;a href=&quot;http://www.andrewsellick.com&quot;&gt;&lt;img src=&quot;http://news.andrewsellick.com/facebook-platform/asellick/images/logo-small.gif&quot; alt=&quot;AndrewSellick.com&quot; title=&quot;AndrewSellick.com&quot; style=&quot;border:0px solid #FFFFFF;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&#8217;;</p>
<p>&nbsp;&nbsp; &nbsp;$fbml .= &#8216;&lt;div style=&quot;width:200px;float:left;background-color:#333333;height:100px;color:#FFFFFF;padding: 10px;font-family:arial;font-size:12px;&quot;&gt;Welcome to the AndrewSellick.com Facebook App.&nbsp; This application provides you with the latest news from AndrewSellick.com. &lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;color:#FFFFFF;text-decoration:underline;&quot; href=&quot;http://www.andrewsellick.com&quot;&gt;Visit AndrewSellick.com&lt;/a&gt;&lt;/div&gt;&#8217;;</p>
<p>&nbsp;&nbsp; &nbsp;$fbml .= &#8216;&lt;div style=&quot;clear: both;&quot;/&gt;&#8217;;</p>
<p>&nbsp;&nbsp; &nbsp;$fbml .= &#8216;&lt;div style=&quot;width:371px; border:1px solid #333333;background-image:url(http://www.andrewsellick.com/wp-content/themes/unsleepable/images/sub-nav-bg.gif);background-repeat:repeat-x;position:top left;&quot; id=&quot;andrewsellick-feed&quot;&gt;&#8217;;<br />
&nbsp;&nbsp; &nbsp;$fbml .= &#8216;&lt;div style=&quot;padding:10px;font-family:verdana;font-size:11px;&quot;&gt;&#8217;;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$fbml .= &#8216;&lt;p style=&quot;margin:0px 0px 8px 0px;color:#666666;&quot;&gt;&lt;a style=&quot;color:#DA1074;&quot; href=&quot;http://www.andrewsellick.com/&quot;&gt;Link One&lt;/a&gt; - &lt;/p&gt;&#8217;;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$fbml .= &#8216;&lt;p style=&quot;margin:0px 0px 8px 0px;color:#666666;&quot;&gt;&lt;a style=&quot;color:#DA1074;&quot; href=&quot;http://www.andrewsellick.com/&quot;&gt;Link Two&lt;/a&gt; - &lt;/p&gt;&#8217;;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$fbml .= &#8216;&lt;p style=&quot;margin:0px 0px 8px 0px;color:#666666;&quot;&gt;&lt;a style=&quot;color:#DA1074;&quot; href=&quot;http://www.andrewsellick.com/&quot;&gt;Link Three&lt;/a&gt; - &lt;/p&gt;&#8217;;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$fbml .= &#8216;&lt;p style=&quot;margin:0px 0px 8px 0px;color:#666666;&quot;&gt;&lt;a style=&quot;color:#DA1074;&quot; href=&quot;http://www.andrewsellick.com/&quot;&gt;Link Four&lt;/a&gt; - &lt;/p&gt;&#8217;;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$fbml .= &#8216;&lt;p style=&quot;margin:0px 0px 8px 0px;color:#666666;&quot;&gt;&lt;a style=&quot;color:#DA1074;&quot; href=&quot;http://www.andrewsellick.com/&quot;&gt;Link Five&lt;/a&gt; - &lt;/p&gt;&#8217;;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;$fbml .= &#8216;&lt;/div&gt;&#8217;;<br />
$fbml .= &#8216;&lt;/div&gt;&#8217;;</p>
<p>
$fbml .= &#8216;&lt;div style=&quot;background-color:#333333;width:373px;font-family:arial;font-size:12px;&quot;&gt;&#8217;;<br />
&nbsp;&nbsp; &nbsp;$fbml .= &#8216;&lt;p style=&quot;padding:10px;margin:0px;&quot;&gt;&lt;a style=&quot;color:#FFFFFF;&quot; href=&quot;&#8217;.$facebook-&gt;get_add_url().&#8217;&quot;&gt;Put AndrewSellick.com in your profile&lt;/a&gt;&lt;/p&gt;&#8217;;<br />
$fbml .= &#8216;&lt;/div&gt;&#8217;;</p>
<p>$fbml .= &#8216;&lt;/div&gt;&#8217;;</p>
<p>$facebook-&gt;api_client-&gt;profile_setFBML($fbml, $user);</p>
<p>?&gt;</p></div>
<div>
<h3><strong>config.inc.php</strong>&nbsp;</h3>
</div>
<p><span>In this tutorial the config.inc.php will remain very simple and only includes two variables for the Facebook API key and a secret key.&nbsp;These are provided when you create your Facebook application in within the Facebook developer area (Detailed later in this tutorial).</span></p>
<div class="code">$api_key = &#8216;INSERT THE API KEY HERE&#8217;;<br />
$secret&nbsp; = &#8216;INSERT THE SECRET HERE&#8217;;</div>
<h3><strong><span>download the tutorial code</span></strong>&nbsp;</h3>
<p><span>Download the <a href="http://www.andrewsellick.com/examples/facebook/tutorial.rar" target="_blank">facebook application development tutorial code</a>.</span></p>
<h3><strong><span>integrating the application with facebook</span></strong><strong>&nbsp;</strong></h3>
<p><span>To actually add the application to Facebook you will need to go through the follwing procedures.</span></p>
<div>&nbsp;</div>
<ol type="1" style="margin-top: 0cm;" start="1">
<li><span>Upload the code within the facebook-platform folder to a PHP5 hosting      environment.</span></li>
<li><span>Log in to Facebook and navigate to the Facebook developer page      (<a href="http://www.facebook.com/developers/">http://www.facebook.com/developers/</a>).</span></li>
<li><span>Click the &ldquo;Set Up a New Application&rdquo; button on the top right of      the page.</span></li>
<li>Insert your desired application name and submit.</li>
<li><span>On setting up the application you will presented with an      overview which displays basic application information including the API      key and Secret required in your config.inc.php.&nbsp;Copy these two keys and insert them in      your config file and then re-upload the file.</span></li>
<li><span>Next on the overview page click to edit your newly created      application.</span></li>
<li>Next we need to insert the application details as follows:
<ul type="circle" style="margin-top: 0cm;">
<li><span>The Callback Url &ndash; Add the URL to the root of the tutorial       application folder you created and uploaded as above.&nbsp;I.E. <a href="http://www.yourdomain.com/facebook-platfom/tutorial/">http://www.yourdomain.com/facebook-platfom/tutorial/</a>       </span></li>
<li><span>The Canvas Page URL &ndash; Add your desired canvas page URL.&nbsp;This has to be unique to Facebook,       although there is automatic validation to prompt you if it is not, so       choose wisely.&nbsp;An example could be       &ldquo;andrewsellicktutorial&rdquo; making the URL <a href="http://apps.facebook.com/andrewsellicktutorial/">http://apps.facebook.com/andrewsellicktutorial/</a>       </span></li>
<li><span>Select the option to allow your application be added on       Facebook.</span></li>
<li><span>The select users to be able to add your application on all       pages.</span></li>
<li>Add your Canvas Page URL to the Side Nav URL. I.e. <a href="http://apps.facebook.com/andrewsellicktutorial/">http://apps.facebook.com/andrewsellicktutorial/</a></li>
<li>Now save the application and that&rsquo;s it.</li>
</ul>
</li>
</ol>
<div>&nbsp;</div>
<p><span>To test it out navigate to the Canvas Page URL in your browser.&nbsp;You should then be able to go through the process of adding the application and finally seeing it displayed on your profile page.</span></p>
<div>
<h3><strong>notes</strong><strong>&nbsp;</strong></h3>
</div>
<p><span>This is a very basic example so I wouldn&rsquo;t recommend users start to advertise their applications off the back of this tutorial.&nbsp;There will be more tutorials to come introducing more features and discussions on the Facebook Cache, its potential pitfalls and how to overcome them.</span></p>
</p>
<p><span>Feel free to play with the code and adapt it for your requirements and let me know how you get on&#8230;<br />
</span></p>
<p><span>I hope this has helped. <img src='http://www.andrewsellick.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> <br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewsellick.com/81/facebook-application-development-part-one/feed</wfw:commentRss>
		</item>
		<item>
		<title>Facebook Invite Friends Code</title>
		<link>http://www.andrewsellick.com/80/facebook-invite-friends-code</link>
		<comments>http://www.andrewsellick.com/80/facebook-invite-friends-code#comments</comments>
		<pubDate>Mon, 26 Nov 2007 23:09:34 +0000</pubDate>
		<dc:creator>andy</dc:creator>
		
		<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://www.andrewsellick.com/80/facebook-invite-friends-code</guid>
		<description><![CDATA[In light of my inpending article on how to create a simple Facebook application I thought I would point you all to a link which you may find helpful now if you already have some experience in developing facebook applications, or if not, you will 100% find it useful after my next article.
The code basically [...]]]></description>
			<content:encoded><![CDATA[<p><img width="200" height="100" align="left" src="http://www.andrewsellick.com/wp-content/uploads/Image/facebook.gif" alt="Facebook Invite Code" />In light of my inpending article on how to create a simple Facebook application I thought I would point you all to a link which you may find helpful now if you already have some experience in developing facebook applications, or if not, you will 100% find it useful after my next article.</p>
<p>The code basically provides the &quot;invite your friends&quot; functionality to your application.&nbsp; It was developed by <a href="http://www.dustinfisher.com/" target="_blank">dustinfisher.com</a> and is a really handy piece of code when it comes to devloping Facebook applications as it can greatly increase the amount of people who add your application.  The more the better huh <img src='http://www.andrewsellick.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<p>Anyway have a look for yourself at the <a target="_blank" href="http://www.dustinfisher.com/2007/07/10/facebook-developer-invite-friends-code/">Facebook Invite Friends Code</a> or simply <a href="http://www.dustinfisher.com/downloads/invite.rar" target="_blank">download the Facebook Invite Friends Code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewsellick.com/80/facebook-invite-friends-code/feed</wfw:commentRss>
		</item>
		<item>
		<title>AndrewSellick.com on Facebook&#8230;</title>
		<link>http://www.andrewsellick.com/78/andrewsellickcom-on-facebook</link>
		<comments>http://www.andrewsellick.com/78/andrewsellickcom-on-facebook#comments</comments>
		<pubDate>Thu, 22 Nov 2007 22:46:19 +0000</pubDate>
		<dc:creator>andy</dc:creator>
		
		<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://www.andrewsellick.com/78/andrewsellickcom-on-facebook</guid>
		<description><![CDATA[I was recently asked to research the possibility of developing Facebook applications and potential timescales in which they could be developed, so I decided the only way I could properly answer that question was to develop a simple application myself to get to grips with what&#8217;s required.
Therefore I give you the AndrewSellick .com Facebook app. [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently asked to research the possibility of developing Facebook applications and potential timescales in which they could be developed, so I decided the only way I could properly answer that question was to develop a simple application myself to get to grips with what&rsquo;s required.</p>
<p><a target="_blank" href="http://apps.facebook.com/andrewsellick/"><img width="230" height="186" align="left" alt="AndrewSellick.com Facebook Application" src="http://www.andrewsellick.com/wp-content/uploads/Image/facebook.jpg" /></a>Therefore I give you the AndrewSellick .com Facebook app.  Woooo <img src='http://www.andrewsellick.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>It&rsquo;s a simple application literally just providing news directly from my web site feed into Facebook (Well I did say it was simple).  However I thought it was as good a place as any to get started.</p>
<p>Have a look for yourself at the <a target="_blank" href="http://apps.facebook.com/andrewsellick/">AndrewSellick.com Advert Facebook application</a>.</p>
<p>I am planning on releasing a tutorial over the next few days documenting how to create a simple app such as this so check back soon if you&rsquo;re interested in Facebook.  Better still add the app to your Facebook profile and wait for the article to come through the feed <img src='http://www.andrewsellick.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Anyway if anybody experiences any difficulties or has any comments please leave them at the bottom of this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewsellick.com/78/andrewsellickcom-on-facebook/feed</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.107 seconds -->
