Categories

What is Twitter oAuth all about?

Share

oAuth as defined on Twitter is

OAuth is an authentication protocol that allows users to approve application to act on their behalf without sharing their password

This would allow customers to give access to their accounts on 3rd party websites to service providers who would use that [...]

How to display tweets from Twitter on your website?

Share

If you tweet a lot on Twitter and wish to display them on your website or blog then you can do that easily with the following code

<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, “http://twitter.com/statuses/friends_timeline.xml”); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERPWD, “<username>:<password>”);

$str = curl_exec($ch);

curl_close($ch); echo $str;

?>

Once you get [...]