Tweet Button

Generates a Tweet Button.

Example




Note: Be sure to add the Twitter Web Intents script (see the Intents Script Tag for more details):

{exp:ce_tweet:intents_script}
{exp:ce_tweet:tweet_button:pair}The tweet text.{/exp:ce_tweet:tweet_button:pair}
<br>
{exp:ce_tweet:tweet_button screen_name="@causingeffect"}
<br>
{exp:ce_tweet:tweet_button hashtag="#cetweet"}
<br>
{exp:ce_tweet:tweet_button size="large" lang="pt"}

Parameters

Note: All parameters are optional.

screen_name=

If a screen name is specified, a "Tweet To Button" (Mention Button) will be created, instead of a Tweet Button.

hashtag=

If a hashtag is specified, a "Tweet #Hashtag" button will be generated, instead of a Tweet Button.

count=

The position of the count box. Can be "horizontal" (the default), "vertical", or "none".

url=

URL of the page to share. By default, the Tweet Button will use the current page's URL.

counturl=

URL to which your shared URL resolves (useful if the url= parameter is a shortened link).

via=

Screen name of the user to attribute the Tweet to.

related=

Related accounts (see https://dev.twitter.com/docs/tweet-button#related).

hashtags=

Comma separated hashtags appended to the tweet text.

lang=

Twitter supported 2-letter language code. Example: es for Spanish.

dnt_opt_out=

Opt out of Twitter's content tailoring. Can be "yes" or "no". Defaults to "yes".

size=

Button size. Can be "medium" or "large". Defaults to "medium" if not specified.

iframe=

Whether or not to generate an iframe, or use anchor links. Can be "yes" or "no". Defaults to "no" (meaning an iframe will not be used). It is recommended to leave this at its default, and not use iframes. The Twitter Web Intents script eventually changes the anchor links to iframes anyway.

Twitter Resources

Tweet Button.