Intents Script

Outputs the Twitter widget/Web Intents script. This script is used to integrate Twitter into your site in various ways to engage your users. It is needed for Twitter Web Intents, Tweet and Follow Button generation, and oEmbeds.

The script can be output in various ways. Generally, you will only need to output the asynchronous (default) version of the script inside your pages' <head></head> element. Additionally, you only need to include the script one time per page.


The following shows the script output in asynchronous mode (the default), synchronous mode, and finally, only the script URL:

<!-- asynchronous -->
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);;js.src="";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

<!-- synchronous -->
<script type="text/javascript" src=""></script>

<!-- synchronous url only -->


<!-- asynchronous -->

<!-- synchronous -->
{exp:ce_tweet:intents_script type="sync"}

<!-- synchronous url only -->
{exp:ce_tweet:intents_script type="url"}



Can be 'sync' (synchronous), 'url' (just the script URL), or 'async' (asynchronous). If not specified, the default is 'async'.

Twitter Resources

Web Intents.