Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…ank for GitHub
  • Loading branch information...
commit 6fa4436b9a530a412ad7515dbe2bb845cf2b0478 1 parent 316a864
Remy authored
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";
Please sign in to comment.
Something went wrong with that request. Please try again.