Thursday, August 18, 2011

Using your Facebook Page to feed your Blog posts.

In this article I will show you the steps I took to feed my Facebook page to the blog on my website. Items you will need for this tutorial: 1) Facebook fan page, 2)feedburner account, 3)an html page on your website where you would like to place the feed.)
Step 1:
  1. Go to your Facebook Fan Page
  2. On the lower left side click on "Subscribe via RSS"
  3. Inside the URL that shows up copy or write down your ID# (i.e. id=105481499496501)
Step 2:
  1. Go to your Google feedburner account and in the "Burn a feed right this instant" form place , replace my top five games id, with yours of course
  2. Click "Next"
  3. Feed Title and Address are automatically filled in, feel free to change the Title or the Subfolder of the URL, do not change the root URL.
  4. Click "Next"
  5. Click on the link that shows up for your feed
  6. in the "Subscribe Now" box click on "View Feed XML"
  7. Copy or write down this URL (i.e.")
Step 3:
  1. Now on one of your pages, probably your blog page, include the code:
$xml = simplexml_load_file('\');
foreach ($xml->entry as $entry)
print "<p>";
$date = substr($entry->published,0,10);
$date = strtotime($date);
print date('F d, Y',$date);
print "<br \>{$entry->content}</p><br \>";
2. you have to save your page with a .php tag instead of .html
3. If you copied and pasted the code, you may need to delete and retype the single and double quotes, because they came across stylized.
4. don't forget to switch out my xml url (i.e. for your own.

No comments:

Post a Comment