-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_all_functions.php5
83 lines (53 loc) · 2.63 KB
/
example_all_functions.php5
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
require_once( './my_twitter.php5' );
$twitter = new MyTwitter('nmeierpolys', 'nathaniel1');
/********************* Status Methods *****************************/
echo 'Status:';
//Update Your Status
$twitter->updateStatus('It Worked!');
//Show last 20 Status of User Time Line in array format.
$twitter->userTimeLine();
//Show last 20 Status of Following Time Line in array format.
$twitter->followingTimeLine();
//Optional $twitter->followingTimeLine(2) to show next page with 20 more status
//Show last 20 Status of Public Time Line in array format.
$twitter->publicTimeLine();
//Show Replies of your Updates in array format.
$twitter->repliesLine();
//Optional $twitter->repliesLine(2) to show next page
//Show a single status, specified by the id parameter below, in array format.
$twitter->showStatus(1234);
//Requires input of the post ID
//Destroy a single status, specified by the id parameter below
$twitter->destroyStatus(1234);
//Requires input of the post ID
/********************* User Methods *****************************/
echo 'User Messages:';
//Returns up to 100 of the authenticating users you follow who have most recently updated, in array format.
$twitter->userFollowing();
//Returns the authenticating user's followers.
$twitter->userFollowers();
//Returns a list of the users currently featured on the site with their current statuses inline; in array format.
$twitter->userFeatured();
//Show a single status, specified by the id or screen name parameter below
$twitter->userShow('screen_name or userID');
/******************** Direct Message Methods************************/
echo 'Direct Messages:';
//Sends a new direct message to the specified user from the authenticating user
$twitter->newMessage('screen_name', 'message to send');
//Destroy a single message, specified by the id parameter below
// $twitter->destroyMessage(1234);
//Requires input of the post ID
//Returns a list of the 20 most recent direct messages sent to the authenticating user; in array format.
$twitter->directMessages();
//Returns a list of the 20 most recent direct messages sent by the authenticating user; in array format.
$twitter->sentMessages();
/********************** Following Methods****************************/
echo 'Following:';
//Follow the user specified in the ID parameter as the authenticating user
$twitter->follow('screen_name or userID');
//Requires input of the post ID or Screen Name
//Discontinues follow with the user specified in the ID parameter as the authenticating user
$twitter->destroyFollow('screen_name or userID');
//Requires input of the post ID or Screen Name
?>