thibaudanthoine / twitter-twig-extension-bundle
Twig extension to facilitate twitter buttons integration
1.0
2014-04-29 20:44 UTC
Requires
- twig/extensions: 1.0.*
This package is not auto-updated.
Last update: 2024-05-25 14:10:15 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() }}