Chirp currently provides a hand-rolled tweet parser allowing you to render imported tweets on your site without hassle.
Get news and updates on the DecodeLabs blog.
Install the library via composer:
composer require decodelabs/chirp
Parse a tweet into HTML:
use DecodeLabs\Chirp\Parser;
$parser = new Parser();
echo $parser->parse($myTweet);
Chirp also provides a Metamorph Handler so that it can be used via its simplified interface:
use DecodeLabs\Metamorph;
echo Metamorph::tweet($myTweet);
The parsed HTML provided by Chirp is now wrapped in a Markup
interface from the Tagged library such that output is handled correctly in all rendering contexts.
Chirp is licensed under the MIT License. See LICENSE for the full license text.