function twitter_user_info($username = null) { // if (!$username) $cb = get_codebird(); $api_options = "screen_name={$username}"; $user_info = $cb->users_show($api_options); twitter_api_status($user_info); return $user_info; }
function twitter_lists_list_subscribers($user, $list) { // Subscribers of a list $cb = get_codebird(); $api_options = array("owner_screen_name" => $user, "slug" => $list); $api_options["count"] = setting_fetch('perPage', 20); $cursor = $_GET['cursor']; if (!is_numeric($cursor)) { $cursor = -1; } if ($cursor > 0) { $api_options["cursor"] = $cursor; } $list = $cb->lists_subscribers($api_options); twitter_api_status($list); return $list; }
function execute_codebird($function, $api_options = NULL) { try { $cb = get_codebird(); $result = $cb->{$function}($api_options); twitter_api_status($result); return $result; } catch (Exception $e) { theme('error', "<div class=\"tweet\">" . "<h2>" . _(ERROR) . "</h2>" . "<pre>" . sprintf(_(ERROR_TWITTER_MESSAGE), $e->getMessage(), $e->getCode()) . "</pre>" . "</div>"); } }