Skip to content

Latest commit

 

History

History
79 lines (59 loc) · 4.75 KB

README.md

File metadata and controls

79 lines (59 loc) · 4.75 KB

Tweetledee

A PHP library that provides an incredibly easy way to access Twitter data as JSON, pretty printed JSON, or RSS feeds by URL or standard command line syntax.

Documentation

Current Release

Recent Changes

  • 0.3.1 : Updated all standard JSON files with cross site access to your Twitter JSON data from client side JavaScript code (sets the Access-Control-Allow-Origin header to accept all connections, i.e. cross origin resource sharing). Defaults to off. Set the flag $TLD_JS = 1 in the file to activate this capability.
  • 0.3.0 : You can now access Tweetledee from the command line locally or remotely via SSH and pipe the output to any application. Data is returned via the standard output stream when you access files with a terminal. Tweetledee will parse the parameters as standard command line switches. For single character parameters use short switches -q and for multiple character parameters use long switches --user.
  • 0.2.9 : Added Twitter user lists RSS feeds listsrss.php, JSON listsjson.php, pretty printed JSON listsjson_pp.php

In the Pipeline

  • Add a caching mechanism to prevent users from exceeding the Twitter API rate limits
  • Add customization options for RSS feed format (change print format)
  • Add user mentions data type (JSON and RSS feeds)
  • Add a file updater

The 1.5 Minute Guide to a Successful Install

You will need the following:

  • Access via URL: PHP version 5.3 or higher (5.4 or higher for pretty printed JSON)

  • Access via command line: PHP version 5.3 or higher (5.4 or higher for pretty printed JSON)

  • libcurl installed (provides cURL - http://curl.haxx.se/libcurl/)

  • A Twitter application account from which you will obtain the:

    1. consumer key
    2. consumer secret
    3. access key
    4. access secret

3-Step Installation instructions:

  1. Open the file on the path tweetledee > tldlib > keys > tweetledee_keys.php in any text editor and enter the information that you obtained from your Twitter app in the corresponding fields. Leave the single quotes around the alphanumeric strings that you enter.

  2. Upload the 'tweetledee' directory (that is located in the directory where this README file resides) to the public facing directory on your web server. On many servers, this is the public_html directory

  3. Kick the tires with the following test (it gives you a user timeline RSS feed for your account): http://[yourdomain]/tweetledee/userrss.php

That was easy... Go crazy, be good, have fun.

What You Get

Twitter Favorites RSS Feed [favoritesrss.php]

Twitter Favorites JSON [favoritesjson.php]

Twitter Favorites Pretty Printed JSON [favoritesjson_pp.php]

Twitter Home Timeline RSS Feed [homerss.php]

Twitter Home Timeline JSON [homejson.php]

Twitter Home Timeline Pretty Printed JSON [homejson_pp.php]

Twitter User Lists RSS Feed [listsrss.php]

Twitter User Lists JSON [listsjson.php]

Twitter User Lists Pretty Printed JSON [listsjson_pp.php]

Twitter User Timeline RSS Feed [userrss.php]

Twitter User Timeline JSON [userjson.php]

Twitter User Timeline Pretty Printed JSON [userjson_pp.php]

Twitter Search RSS Feed [searchrss.php]

Twitter Search JSON [searchjson.php]

Twitter Search Pretty Printed JSON [searchjson_pp.php]

Usage

Tweetledee Usage Examples

Bugs & Questions

If you find a bug, please post it as a new issue on the GitHub repository with this information in your report.

Looking for support? Check this page.

If you would like to contribute to the project, by all means, please do so. Fork Tweetledee and submit a pull request back to the repository. I will make a development branch if there is any significant interest in contributing to the project.

License

MIT License - see the LICENSE.txt file in the source distribution

✪ Chris