<?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>ajgraham.com &#187; facebook</title>
	<atom:link href="http://www.ajgraham.com/tag/facebook/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ajgraham.com</link>
	<description>web design, development and consultation in Prague</description>
	<lastBuildDate>Fri, 02 Jul 2010 21:55:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Retrieve Facebook page status with no authenticating or permissions issues</title>
		<link>http://www.ajgraham.com/2010/07/get-facebook-page-stream-simple-easy/</link>
		<comments>http://www.ajgraham.com/2010/07/get-facebook-page-stream-simple-easy/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 21:42:11 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[auth]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[retrieve]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[scraping]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[status]]></category>
		<category><![CDATA[stream]]></category>

		<guid isPermaLink="false">http://www.ajgraham.com/?p=451</guid>
		<description><![CDATA[If you&#8217;re just looking to read the &#8216;Stream&#8217; or &#8216;Statuses&#8217; of a Facebook fan page (not a normal Profile page) it can be done very easily. Due to all Fan Pages being public (their are 2 settings: published or unpublished), as long as the Fan page is published then you [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re just looking to read the &#8216;Stream&#8217; or &#8216;Statuses&#8217; of a Facebook fan page (<em>not</em> a normal Profile page) it can be done very easily. Due to all Fan Pages being public (their are 2 settings: published or unpublished), as long as the Fan page is published then you can retrieve any data from it, no authentication, no API, no messing around.</p>
<p>Step 1 &#8211; Find the page feed for the Fan Page<br />
The basic URL format of a Facebook fan page feed is:</p>
<pre><code>https://graph.facebook.com/ID of Page/feed</code></pre>
<p>If you can&#8217;t find your unique Page ID <a target="_blank" rel="nofollow" href="http://help.wildfireapp.com/faqs/tutorials/how-to-find-out-your-facebook-fan-page-public-profile-id">read this guide</a>.<br />
<a target="_blank" rel="nofollow" href="https://graph.facebook.com/ID of Page/feed">Test it by opening the link in another browser window</a>. If you get a whole load of data in square and curly brackets (it&#8217;s JSON) that contains posts from your fan page then you&#8217;re set for Step 2.</p>
<p>*Please note that this URL gets every post from your Wall/Stream limited to about the 50 most recent from what I&#8217;ve seen. This includes everything that other people have posted as well in the form of their posts or comments, etc.</p>
<p>Step 2 &#8211; Extract the last status from the feed URL data</p>
<p>Here comes the basic PHP code, you need to put in the Page ID for the
<pre><code>$pageID</code></pre>
<p> variable:</p>
<pre><code>$pageID = "ID of Page"
$url = "https://graph.facebook.com/". $pageID ."/feed";
$json = file_get_contents($url);
$jsonData = json_decode($json);

foreach($jsonData->data as $val) {
	if($val->from->id == $pageID) { //find the first matching post/status by a fan page admin
		$message = $val->message;
		echo $message;
		break; //stop looping on most recent status posted by page admin
	}
}</code></pre>
<h3>Things to consider</h3>
<p>Extracting the data from Facebook directly using a server-side approach should not be used for production as it&#8217;s really inefficient as it adds a noticeable pause to page loading times and will break if Facebook is slow in responding. I provided a basic demo to show how easy it can be done, but you should expand on this by storing the data extracted in a database or file on your server via CRON jobs. Another alternative would be to do it client-side with JavaScript, it depends on the frequency the Fan page data you want is expected to change and what you&#8217;re doing with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ajgraham.com/2010/07/get-facebook-page-stream-simple-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Facebook Problem</title>
		<link>http://www.ajgraham.com/2009/09/the-facebook-problem/</link>
		<comments>http://www.ajgraham.com/2009/09/the-facebook-problem/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 12:53:01 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[General IT]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[settings]]></category>

		<guid isPermaLink="false">http://ajgraham.com/?p=60</guid>
		<description><![CDATA[Facebook is a really useful service which I use a lot to keep up with friends that have moved away, I even have my dad added on it. There is a huge privacy conundrum in its current state due to the way applications are given free reign with data. 
If [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook is a really useful service which I use a lot to keep up with friends that have moved away, I even have my dad added on it. There is a huge privacy conundrum in its current state due to the way applications are given free reign with data. </p>
<p>If one of your Friends installs/uses an application, that application is given the same access rights to <em>all</em> of their Friends data (one of them being you!) as they have. This gives the application the opportunity to copy and store very personal information such as date of birth, address, telephone number(s), employment and/or education history (assuming you&#8217;ve added it and not limited the access to it). So for every silly, pointless quiz/game that one of your Friends installs/uses it opens all of the data on your profile up for it to misuse.</p>
<p>There is a very simple fix to this though. Delete your profile, all your friends or wait until next year sometime when Facebook implements more stringent controls on data access for applications&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ajgraham.com/2009/09/the-facebook-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
