Choose Your Theme
Warren Shea

Site Updates – Facebook Status and Recent Comments in the Right Col. –>

Tuesday, January 24th, 2012 at 12:00 am

Wow, when was the last time I did any type of site update?

Anyways, I did some worldofwarren.com maintenance today, first time in a while.

What I did was add 1 Facebook Status to the right column, underneath the 3 Twitter Tweets.
Below that, I added the 3 most recent Comments, underneath the Facebook Statuses.

I didn’t want to display the comments too prominently on my site as it’s not my content, so I make you simply click “See most recent” to see them. I notice that sometimes I get really good or interesting comments on really old posts. It’s very likely no one would read those though…(other than me) and I find that unfortunate. I’d like those voices to be heard/read.

I really hope this doesn’t discourage people from commenting. Comment on this post if you think it’s a bad idea…and it will ironically do what you don’t want it to do! So….basically, I’m saying there’s nothing in it for you.

<Technical Tutorial>
Getting the Facebook Status to work was pretty difficult. There’s a Facebook RSS feed but you can’t just pull from it. But that’s the same as any RSS feed. You have to create a proxy to bypass the cross domain issues. It’s super simple:

proxy.php

<?php header(“Expires:Mon, 31 Dec 2010 05:00:00 GMT”); ?>
<?php
if ($_GET[“type”] = “xml”) {
header(“Content-type: text/xml”);
$page_contents = file_get_contents($_GET[“url”]);
}
echo $page_contents;
?>

and I just call any XML/RSS via URLs like this:

proxy.php?type=xml&url=http://search.twitter.com/search.atom?q=from:warrenshea
proxy.php?type=xml&url=http://www.worldofwarren.com/?feed=comments-rss2

Unfortunately, for some reason, Facebook doesn’t allow this. They have this whole Developer API you have to work with to get the Facebook Statuses. Why? I think that imo, having Facebook Statuses come up as simple RSS feeds for people defeat the purpose of Facebook, as well as they lose money on advertising if you can pull the Facebook Statuses from other sites.

So I had to do something else for Facebook Status. I’m not going to write a tutorial since I didn’t make it. I will say that I got it HERE:
PHP Show Your Facebook Status on your blog/website
</Technical>

Leave a Reply