thibaudanthoine / twitter-twig-extension-bundle
Twig extension to facilitate twitter buttons integration
Package info
github.com/thibaudanthoine/twitter-twig-extension-bundle
pkg:composer/thibaudanthoine/twitter-twig-extension-bundle
1.0
2014-04-29 20:44 UTC
Requires
- twig/extensions: 1.0.*
This package is not auto-updated.
Last update: 2026-03-14 22:54:53 UTC
README
Provides Twig extension for facilitating Twitter buttons integration.
Installation
1 - Add package to your composer.json:
{
"require": {
"thibaudanthoine/twitter-twig-extension-bundle": "dev-master"
}
}
2 - Edit your app/AppKernel.php and register bundle:
public function registerBundles() { $bundles = array( // ... new Thibaud\TwitterTwigExtensionBundle\ThibaudTwitterTwigExtensionBundle(), ); // ...
3 - Finally configure the service in app/config/config.yml:
thibaud_twitter_twig_extension: enabled: true lang: "%locale%" large: true buttons: share: show_count: true follow: username: "thibaudanthoine" show_username: true
Using Twitter twig extension bundle
To include Twitter button (share or follow) in your application, simply use twig functions below:
{{ twitter_button_share() }}
<!-- OR -->
{{ twitter_button_follow() }}