getPoll($poll_id); } catch (NotFoundException $nfe) { die('Poll not found'); } catch (HttpPnutForbiddenException $fe) { die('Poll token required!'); } catch (NotSupportedPollException $nspe) { die('Sorry, this poll has a not yet supported type: ' . $nspe->getMessage()); } #echo json_encode($poll); #$user_avatar_url = $api->getAvatarUrl($poll->user->id, 50); $user_avatar_url = $poll->user->getAvatarUrl(50); $prompt = '@' . $poll->user->username . ' asks: ' . $poll->prompt; echo ''; echo $prompt;