<?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>web2.0goodies.com &#187; facebook</title>
	<atom:link href="http://web2.0goodies.com/blog/category/facebook/feed/" rel="self" type="application/rss+xml" />
	<link>http://web2.0goodies.com/blog</link>
	<description>Tips, Tricks, and How To's for Web 2.0</description>
	<lastBuildDate>Tue, 03 Jan 2012 05:34:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Facebook Profile Tab Application (FBML)</title>
		<link>http://web2.0goodies.com/blog/facebook/facebook-profile-tab-application-fbml/</link>
		<comments>http://web2.0goodies.com/blog/facebook/facebook-profile-tab-application-fbml/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 03:17:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[facebook]]></category>
		<category><![CDATA[FBML]]></category>
		<category><![CDATA[Profile Tabs]]></category>

		<guid isPermaLink="false">http://web2.0goodies.com/blog/?p=102</guid>
		<description><![CDATA[To Start with, setup your application with these instructions: (Insert link here). Receiving Facebook Posts You FBML application will receive information from Facebook in the form of a signed post. To determine if a post from facebook is authentic, there is an algorithm described here. I have written a class I use that looks like [...]]]></description>
			<content:encoded><![CDATA[<p>To Start with, setup your application with these instructions:  (Insert link here).</p>
<h3>Receiving Facebook Posts</h3>
<p>You FBML application will receive information from Facebook in the form of a signed post.  <a href=" http://wiki.developers.facebook.com/index.php/Verifying_The_Signature">To determine if a post from facebook is authentic, there is an algorithm described here.</a></p>
<p>I have written a class I use that looks like this:  </p>
<pre name="code" class="php">
require_once('config.php');

class Joey_Facebook{
	public static function getFacebookParams(){
		if(!isset($_POST['fb_sig'])) throw new Joey_Facebook_Exception("No Facebook Signatore Parameter");

	    $parameters = $_POST;    

	    if(self::authenticatePayloadFromFacebook($parameters, FACEBOOK_APPLICATION_SECRET)){
	    	return $parameters;
	    }
	    else{
	    	throw new Joey_Facebook_Exception("Parameters Do Not Authenticate!");
	    }
	}

	private static function authenticatePayloadFromFacebook($parameters, $application_secret){
		ksort($parameters);
	    $payload = '';

		foreach ($parameters as $key => $value) {
	        if ($key != 'fb_sig') {
	            $payload .= substr($key, 7) . '=' . $value;
	        }
	    }

	    if (md5($payload . $application_secret) == $parameters['fb_sig']) {
	    	return true;
	    }
	    else{
	    	return false;
	    }
	}
}

class Joey_Facebook_Exception extends Exception{
	public $msg;
	public function __construct($msg){
		$this->msg = $msg;
	}
}
</pre>
<p>Once you have authenticated the request,  you can now use the data in it.  The important data (to me) is&#8230;</p>
<p>When a user has granted your appliation basic permissions, the $_POST['fb_sig_user'] is the facebook users id.  Your application can use this to store and retrieve database records, display customized content, etc&#8230;</p>
<p>If your application is viewed via a profile tab, the profile owner&#8217;s fbid is in $_POST['fb_sig_profile_id'].</p>
<p>With these two basic pieces of information you can essentialy embed basic web applications into Facebook.  You can gather much more information from the post, and also use Facebook&#8217;s API (btw&#8230;  It does need to be de-mistified&#8230;) to gather more information about the user and add more social features to your application.</p>
<h3>Getting a user to &#8220;Add Application&#8221;</h3>
<p><a href="http://wiki.developers.facebook.com/index.php/Authorization_and_Authentication_for_Canvas_Page_Applications_on_Facebook">To redirect the user to the basic add application page, view the details on this page.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://web2.0goodies.com/blog/facebook/facebook-profile-tab-application-fbml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook f8 announces new Easy to use API</title>
		<link>http://web2.0goodies.com/blog/facebook/facebook-f8-announces-new-easy-to-use-api/</link>
		<comments>http://web2.0goodies.com/blog/facebook/facebook-f8-announces-new-easy-to-use-api/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 22:18:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[facebook]]></category>
		<category><![CDATA[Social Media]]></category>

		<guid isPermaLink="false">http://web2.0goodies.com/blog/uncategorized/facebook-f8-announces-new-easy-to-use-api/</guid>
		<description><![CDATA[If you are a serious web developer that wants to ride the wave into the next decade, you MUST integrate with Social Networking / Media in your apps. Fortunatly, facebook just released a new API that is a piece of cake to use. WAY WAY WAY easier than their old one. Check out the video [...]]]></description>
			<content:encoded><![CDATA[<p>If you are a serious web developer that wants to ride the wave into the next decade, you MUST integrate with Social Networking / Media in your apps.  Fortunatly, facebook just released a new API that is a piece of cake to use.  WAY WAY WAY easier than their old one.</p>
<p>Check out the video about it&#8217;s features here:    (The best stuff is half way through the video)  </p>
<p><a href="http://www.facebook.com/f8">http://www.facebook.com/f8</a></p>
]]></content:encoded>
			<wfw:commentRss>http://web2.0goodies.com/blog/facebook/facebook-f8-announces-new-easy-to-use-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get more pageviews!  How to add a &#8220;Post to Facebook&#8221; button to your site!</title>
		<link>http://web2.0goodies.com/blog/facebook/get-more-pageviews-how-to-add-a-post-to-facebook-button-to-your-site/</link>
		<comments>http://web2.0goodies.com/blog/facebook/get-more-pageviews-how-to-add-a-post-to-facebook-button-to-your-site/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 07:01:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[facebook]]></category>
		<category><![CDATA[Social Media]]></category>

		<guid isPermaLink="false">http://web2.0goodies.com/blog/?p=78</guid>
		<description><![CDATA[This is so so easy&#8230; Every site on the web should have one of these&#8230; All you have to do, is paste the code from here: http://www.facebook.com/facebook-widgets/share.php Onto your site&#8230; See: Share with my friends.]]></description>
			<content:encoded><![CDATA[<p>This is so so easy&#8230;  Every site on the web should have one of these&#8230;</p>
<p>All you have to do, is paste the code from here: <a href="http://www.facebook.com/facebook-widgets/share.php">http://www.facebook.com/facebook-widgets/share.php</a></p>
<p>Onto your site&#8230;</p>
<p>See: <a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share with my friends.</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://web2.0goodies.com/blog/facebook/get-more-pageviews-how-to-add-a-post-to-facebook-button-to-your-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

