Example #1
0
 protected function _fetch_status_twitter($u, &$status, $info, $social)
 {
     try {
         $sdk = new tw\SDK($info['oauth_token'], $info['oauth_token_secret']);
         $tweets = $sdk->getUserTweets($info['details']['id_str'], array('count' => 1, 'include_rts' => false));
         if (count($tweets)) {
             $status = $tweets[0];
         }
     } catch (tw\TwitterAccessTokenException $e) {
         $this->_notify_invalidate($u['_id'], $social);
     }
 }