Browse files

Added Twitter auth option - used in production, but obviously left bl…

…ank for GitHub
  • Loading branch information...
1 parent 316a864 commit 6fa4436b9a530a412ad7515dbe2bb845cf2b0478 Remy committed Jun 2, 2009
Showing with 6 additions and 1 deletion.
  1. +6 −1 index.php
View
7 index.php
@@ -1,6 +1,11 @@
<?php
function grab_and_store($user, $db) {
- $user_profile = json_decode(file_get_contents('http://twitter.com/users/' . $user . '.json'));
+ include('twitter_auth.php');
+ if (!@$twitter_auth) {
+ $twitter_auth = '';
+ }
+
+ $user_profile = json_decode(file_get_contents('http://' . $twitter_auth . 'twitter.com/users/' . $user . '.json'));
if (!$user_profile) {
return "http://static.twitter.com/images/default_profile_bigger.png";

0 comments on commit 6fa4436

Please sign in to comment.