With Twitter making the big change to dump basic authentication, it looks like if you pass a username and password through curl, then you'll be getting a 401.
So What do you do?
Well, I changed 2 things to ensure I fall inline with the api:
- Change the fetch domain in TwitterModel.php (Line:96)
was:$url = "http://twitter.com/status...
change to:$url = "http://api.twitter.com/1/status...
- Comment out the curl username and password (Line:92)
I've just added @Anywhere to this site. It's was relatively easy. Here's what I did.
1. Signed up
First things first, you need to goto @Anywhere and sign up. Add your application name and webiste details. It's pretty straight forward. From there they give you a code to copy and paste
2. Updated default.phtml
I opened protected/application/public/views/layouts/default.phtml and pasted the code I got into the <head>
<script src="http://platform.twitter.com/anywhere.js?
id=<YOUR ID GOES HERE>&v=1">
</script>
<script type="text/javascript">
twttr.anywhere(function(twitter) {
twitter.hovercards();
});
</script>
3. Updated Timeline/view.phtml
As an added bonus, I figured that if I were to get a comment on a tweet through my site, then it should go through twitter. Makes sense, yes? So I added this little snippet into protected/application/public/views/scripts/timeline/view.phtml.
if ($this->item->getType()=="status") : ?>
<div id="tbox"></div>
<script type="text/javascript">
twttr.anywhere(function (T) {
T("#tbox").tweetBox({
label: "Your thoughts?",
height: 100,
width: 400,
defaultContent: "@ethernick "
});
});
</script>
I inserted it just below
echo "<div class='date' id='".date("YMj", $timestamp)."'>$date
</div>";
echo $this->partial('timeline/item.phtml', array('item' => $item,
'admin' => $this->admin, 'model' => $this->model,
'disqus' => $this->disqus, 'googlefc' =>
$this->googlefc));
And Blam-o!
Roll over these to see the hovercards: @ethernick @breakingthedial
Or if you want, checkout one of my tweets to see the tweetbox in action



formspring.me
