Skip navigation

Blog > Facebook and Twitter status on your website

With the increase in popularity with social networking sites such as Twitter and Facebook, more and more clients are asking for their latest status updates and tweets to be displayed on their site.

To set up the live updates on these two sites you need to access them in slightly different ways.

With Twitter you can use the following link, altering the file at the end to match your twitter profile as well as the number of updates to show, so for Bluelinemedia our link is:

Once you have your xml feed you can then create a new DOM document class to load the xml and process its contents ready to display on your website.

$aXMLDoc = new DOMDocument();


With Facebook there are a number of steps to obtain a unique URL for your updates. First of all you need to register a new application and enter the profile who's updates you want to show. This then sends a request to the profile for them to approve. The request will then come through, giving you a URL and also a token to use. Now you have the full URL you can open a CURL connection and read the url.