Display Multiple Twitter Feeds on your Website
- You should already have a consumer key, consumer secret, access token and access token secret for both of your twitter accounts. If not please go to http://www.worldoweb.co.uk/2012/create-a-twitter-app-for-the-new-api for a little guide into creating the Twitter App.
- PHP Server with CURL – I have tested it using PHP 5.3+
- A little knowledge of PHP and CSS are beneficial but not essential.
Once you have copied the files to your server I suggest that you test the installation before deploying it on your live website. Open up keys.php in the twitter/includes folder and add your consumer key, consumer secret, user token and user secret. Save and close. You can also change whether you want to include retweets and/or exclude replies from your feed by changing the respective values to either True or False. Please note replies and retweets will count towards the maximum number you request, unfortunately I cannot change it due to the Twitter API. The only suggestion is to set max_tweets to a higher amount when calling the display_tweets function.
```php //Include the display-tweets file- Ensure that you have the correct path include 'twitter/display-tweets.php';//Function to display your tweets
display_tweets('user1', 'user2','default', 10, 20);
Further options and information are available on my blog
http://www.worldoweb.co.uk/2013/multiple-users-access-twitter-1-1-api-with-oauth-script