oEmbed Tag
Returns information allowing the creation of an embedded representation of a Tweet on third party sites. See the oEmbed specification for information about the response format.
Note: The output from this tag is not cached automatically. Each time an oembed tag is displayed, it counts as a hit against the API limit. For this reason (and because cached results are faster), it is strongly recommended to always use some form of caching with this tag. Check out ExpressionEngine® native tag caching or CE Cache for caching options.
Example
If you build EE sites, check out my friend Aaron's (@causingeffect) twitter plugin. It's the BEST one I've ever used. http://t.co/9QRbxP4F
— Adam Clark (@avclark) May 8, 2012
If the hide_thread=
parameter is set to "no"
(it is by default), the oembed may show a piece of the thread:
@siffring I expected better from you Jason! This is the first time I have seen a score of -10/1000! http://t.co/IsYuvlV7 ;)
— Causing Effect (@causingeffect) January 12, 2012
Note: These docs are static, so relative dates may be inaccurate.
Note: You have complete control over the code, variables, and style of your Tweets. If you plan on utilizing the reply, favorite, and/or retweet actions, make sure to add the Twitter Web Intents script (see the Intents Script Tag for more details):
Parameters
Note: The tweet id= or url= parameter is required. The other parameters are all optional.
id=
The Tweet/status ID to return embed code for.
url=
WThe URL of the Tweet/status to be embedded.
maxwidth=
The maximum width in pixels that the embed should be rendered at. This value is constrained to be between 250 and 550 pixels.
hide_media=
Specifies whether the embedded Tweet should automatically expand images which were uploaded with media. When set to "yes"
, images will not be expanded. Defaults to "no"
.
hide_thread=
Specifies whether the embedded Tweet should automatically show the original message in the case that the embedded Tweet is a reply. When set to "yes"
, the original Tweet will not be shown. Defaults to "no"
.
align=
Specifies whether the embedded Tweet should be left aligned, right aligned, or centered in the page. Valid values are "left"
, "right"
, "center"
, and "none"
. Defaults to "none"
, meaning no alignment styles are specified for the Tweet.
lang=
Language code for the rendered embed. This will affect the text and localization of the rendered HTML.
Variables
{author_url}
{cache_age}
{height}
{html}
{provider_name}
{provider_url}
{provider_version}
{type}
{url}
{width}
Note: Take a look at the Twitter Tweets documentation for more details about the variables.
Twitter Resources
This method is an implementation of the Twitter statuses/oembed REST API.