Drupal Sharing Customization

Twitter Tweet Button

Use the following code as a template for displaying a Twitter Tweet button.

Note: Twitter no longer provides share counters. Existing Tweet buttons with a counter will automatically revert to a regular Tweet button without the counter.

Default Twitter Tweet button

<div class="a2a_kit a2a_default_style">
    <a class="a2a_button_twitter_tweet"></a>
</div>

<script async src="https://static.addtoany.com/menu/page.js"></script>

Add the following HTML code, for example, to the "Service Buttons HTML code" box in Drupal Configuration > Web services > AddToAny > Buttons > Service Buttons.

<a class="a2a_button_twitter_tweet"></a>

In WordPress, the Twitter Tweet button is available by clicking the "Add/Remove Services" button in Settings > AddToAny > Share Buttons.


Custom Twitter Tweet button

Each Twitter Tweet button is independently customizable by specifying any Twitter Tweet button property as a data attribute. For example, you can change the language of the Tweet button to Spanish, target a specific URL to share, attribute a Twitter username, and much more.

<div class="a2a_kit">
    <a class="a2a_button_twitter_tweet" data-lang="es" data-url="https://example.com/" data-via="AddToAny"></a>
</div>

<script async src="https://static.addtoany.com/menu/page.js"></script>
<a class="a2a_button_twitter_tweet" data-lang="es" data-url="https://example.com/" data-via="AddToAny"></a>