/
apage.php
executable file
·34 lines (25 loc) · 1 KB
/
apage.php
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
<?php
/**
* @file
* User has successfully authenticated with Twitter. Access tokens saved to session and DB.
*/
/* Load required lib files. */
session_start();
require_once('twitteroauth/twitteroauth.php');
require_once('config.php');
include('functions.php');
define("CONSUMER_KEY", "????");
define("CONSUMER_SECRET", "????");
define("OAUTH_TOKEN", "????");
define("OAUTH_SECRET", "????");
/* jason is adding this part */
$connection = getConnectionWithAccessToken(OAUTH_TOKEN, OAUTH_SECRET);
$content = $connection->get('statuses/home_timeline', array('count' => 75) );
/* Some example calls */
//$connection->get('users/show', array('screen_name' => 'abraham')));
//$connection->post('statuses/update', array('status' => date(DATE_RFC822)));
//$connection->post('statuses/destroy', array('id' => 5437877770));
//$connection->post('friendships/create', array('id' => 9436992)));
//$connection->post('friendships/destroy', array('id' => 9436992)));
/* Include HTML to display on the page */
include('html.inc');