Skip to content

arc_twitter_intents

drmonkeyninja edited this page Aug 1, 2011 · 2 revisions

arc_twitter_intents requires arc_twitter v3 or higher to work.

Apart from the arc_twitter_intent_follow tag, all the arc_twitter_intents tags work within an article context. If you use them elsewhere in your Textpattern templates then you will need to specifically set the id attribute to the Tweet ID number on Twitter; you can identify the ID number from a tweet by looking at the URL of the tweet.

The arc_twitter_intent_follow tag

Syntax

<txp:arc_twitter_intent_follow>Follow</txp:arc_twitter_intent_follow>

Usage

Attribute Description Default Example
user Twitter user name to follow arc_twitter username user="drmonkeyninja"
user_id Twitter user id to follow (overrides the user attribute) arc_twitter username user="drmonkeyninja"

The arc_twitter_intent_favorite tag

Syntax

<txp:arc_twitter_intent_favorite>Favorite</txp:arc_twitter_intent_favorite>

Usage

Attribute Description Default Example
id Tweet id to favourite article’s associated tweet from arc_twitter
user Twitter user name related to tweet arc_twitter username user="drmonkeyninja"
related Comma separated list of related Twitter users to recommend following unset related="textpattern, twitter"

The arc_twitter_intent_retweet tag

Syntax

<txp:arc_twitter_intent_retweet>Retweet</txp:arc_twitter_intent_retweet>

Usage

Attribute Description Default Example
id Tweet id to retweet article’s associated tweet from arc_twitter
user Twitter user name related to tweet arc_twitter username user="drmonkeyninja"
related Comma separated list of related Twitter users to recommend following unset related="textpattern, twitter"

The arc_twitter_intent_reply tag

Syntax

<txp:arc_twitter_intent_reply>Reply</txp:arc_twitter_intent_reply>

Usage

Attribute Description Default Example
id Tweet id to reply to article’s associated tweet from arc_twitter
user Twitter user name related to tweet (used for recommended accounts) arc_twitter username user="drmonkeyninja"
related Comma separated list of related Twitter users to recommend following unset related="textpattern, twitter"
text Set some text for the reply tweet unset

Language

All the arc_twitter_intents tags have an optional “lang” attribute for setting the language of the Twitter interface. The following values/languages are available:-

Attribute value Language
en English (default)
fr French
it Italian
es Spanish
ko Korean
jp Japanese

JavaScript

All the arc_twitter_intents tags have two optional attributes that relate to the inclusion of the Twitter widget JavaScript.

Attribute Description Default Example
include_js Include the Twitter widget JavaScript true include_js="false"
optimise_js Optimise the JavaScript by using a local script rather than that hosted on the Twitter site false optimise_js="true"

TXP Tweet will only include the widget JavaScript once on a page regardless of the number of tags used that include it.