FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Test/tweets/index.php at master · JavaDevl/Test · GitHub
JavaDevl
/
Test
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Test
/
tweets
/
index.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
36 lines (28 loc) · 1.23 KB
Breadcrumbs
Test
/
tweets
/
index.php
Copy path
File metadata and controls
36 lines (28 loc) · 1.23 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
ini_set
(
'
display_errors
'
,
1
);
require_once
(
'
TwitterAPIExchange.php
'
);
/** Set access tokens here - see: https://dev.twitter.com/apps/ **/
$
settings
=
array
(
'
oauth_access_token
'
=>
"
880555015-xcTf3Coso6Yc8rJ5ZMthrhD9zTyWa9bY76hKb5mi
"
,
'
oauth_access_token_secret
'
=>
"
t46F1cNcxibrrbRzzVIQ7g2HdiCfyxUVbKfKNH3s
"
,
'
consumer_key
'
=>
"
c5YVssi4M4x1qhVZqfhbQ
"
,
'
consumer_secret
'
=>
"
JlzPN1AvTR6CdS0joI6ATDpXyISERxNBwPhDi1k00EY
"
);
/** Perform a GET request and echo the response **/
/** Note: Set the GET field BEFORE calling buildOauth(); **/
$
url
=
'
https://api.twitter.com/1.1/followers/ids.json
'
;
$
getfield
=
'
?screen_name=J7mbo
'
;
$
requestMethod
=
'
GET
'
;
$
twitter
=
new
TwitterAPIExchange
(
$
settings
);
$
tweets
=
json_decode
(
file_get_contents
(
"
http://search.twitter.com/search.json?q=php&rpp=5&include_entities=true&result_type=mixed
"
));
foreach
(
$
tweets
->
results
as
$
t
){
echo
"
Username:
{
$
t
->
Breakingnews
}"
;
echo
"
Tweet:
{
$
t
->
text
}"
.
PHP_EOL
;
$
responseJson
=
file_get_contents
(
'
http://api.twitter.com/1/statuses/user_timeline.json?screen_name=take_me_fishing&include_rts=1&count=1
'
);
if
(
$
responseJson
)
{
$
response
=
json_decode
(
$
responseJson
);
$
status
=
$
response
->
text
;
}
print_r
(
$
responseJson
);
}
Back
|
FazBrowse Home
|
New Git URL