Campustream 1.0
A social network MQP for WPI
|
00001 <? 00002 include_once $GLOBALS['APPROOT'] . 'application/lib/twitteroauth/twitteroauth.php'; 00003 00007 class twitter { 00008 00013 public static function api(User_Model $user = null) { 00014 return new TwitterOAuth( 00015 $GLOBALS['TWITTER_CONSUMER_KEY'], 00016 $GLOBALS['TWITTER_CONSUMER_SECRET'], 00017 (empty($user) ? null : $user->twitter()->oauth_token), 00018 (empty($user) ? null : $user->twitter()->oauth_secret) 00019 ); 00020 } 00021 }