Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93598857
twitter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 30, 01:34
Size
405 B
Mime Type
text/x-php
Expires
Mon, Dec 2, 01:34 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
22671220
Attached To
rPH Phabricator
twitter.php
View Options
<?php
require
(
__DIR__
.
'/../bootstrap.php'
);
$query
=
urlencode
(
'#PHP'
);
$response
=
\Httpful\Request
::
get
(
"http://search.twitter.com/search.json?q=$query"
)->
send
();
if
(!
$response
->
hasErrors
())
{
foreach
(
$response
->
body
->
results
as
$tweet
)
{
echo
"@{$tweet->from_user} tweets
\"
{$tweet->text}
\"\n
"
;
}
}
else
{
echo
"Uh oh. Twitter gave us the old {$response->code} status.
\n
"
;
}
Event Timeline
Log In to Comment