/php-backtype

A simple PHP wrapper for the BackType api

Primary LanguagePHP

Usage:

1- Include the backtype.php file at the head of your script.

2- Instantiate the backtype object, passing in your API key:

$key = <your backtype api key>
$responseFormat = <"json" or "xml"> //optional; defaults to json
$itemsPerPage = <1-100> // optional; defaults to 25
$bt = new backtype($key, $responseFormat, $itemsPerPage)

3- Call the methods you want to get your data. These are documented in the code and unit tests, and on the backtweets api docs. Here's an example of getting the number of comments per page:

$url = "http://blog.backtype.com/2009/12/tweetcount-updated-supports-wordpress-2-9-bitly-pro/";
echo $bt->commentsByPage($url);

This is the first wrapper like this I've written, so I'm sure it's not perfect. If you have any trouble, let me know and I'll try to fix it. Enjoy, and thanks to the folks at BackType for the cool API!

License: MIT