-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathexample.php
43 lines (29 loc) · 1.3 KB
/
example.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
35
36
37
38
39
40
41
42
43
<?php
require_once('Creare_Twitter.php');
$twitter = new Creare_Twitter();
##########################################################
# You can either edit the following per implementation - #
# or simply edit them in the class and remove all of #
# these property overrides #
##########################################################
# username and number of tweets you want to return
$twitter->screen_name = "creareseo";
$twitter->not = 1;
# twitter credentials - check https://www.creare.co.uk/whatever-happened-to-twitters-latest-tweets for a how-to
$twitter->consumerkey = "XXXX";
$twitter->consumersecret = "XXXX";
$twitter->accesstoken = "XXXX";
$twitter->accesstokensecret = "XXXX";
# cache file
$twitter->cachefile = $_SERVER['DOCUMENT_ROOT']."/twitter/twitter.txt";
/* You can optionally change the following public properties
$twitter->tags = true; // show all html tags? FALSE = remove all tags
$twitter->nofollow = true; // all links to be no-follow?
$twitter->newwindow = true; // all links to open in new window?
$twitter->hashtags = true; // link up hashtags to twitter search?
$twitter->attags = true; // link up @ tags to profile pages
*/
$tweets = $twitter->getLatestTweets();
foreach($tweets as $tweet){
echo "<p>".$tweet['tweet']." - ".$tweet['time']."</p>";
}