After not finding anyone else who has done so, I created a minimal PHP implementation of the CrowdTangle API, which I needed anyway for a project I’m working on:
- GitHub repo: https://github.com/ChrisHardie/crowdtangle-api
- Packagist repo: https://packagist.org/packages/chrishardie/crowdtangle-api
Example usage syntax:
$client = new ChrisHardie\CrowdtangleApi\Client($accessToken);
// get lists
$client->getLists();
// get accounts in a list
$client->getAccountsForList($listId);
// get posts
$client->getPosts([
'accounts' => '12345678',
'startDate' => '2022-03-01',
]);
// get a single post
$client->getPost($postId);
I’m sure there’s plenty to improve but I hope it’s helpful to anyone working with CrowdTangle in PHP.