Embedded Moment parameter reference
Customize an embedded Moment with data-* attributes added to a fallback anchor element or passed to a JavaScript factory function in an options object.
Parameters
data-limitDisplay a maximum number of items between 1 and 20 inclusive.
Example Value: 3
data-widthSet the maximum width of the embedded moment. Minimum: 220.
Example Value: 400
data-langA supported Twitter language code.
Loads template text components in the specified language. Note: does not affect the original text of an author.
Example Value: es
data-dntWhen set to true, the Moment and its embedded page do not influence Twitter targeting including suggested accounts.
Example Value: true
HTML example
<a class="twitter-moment" href="https://twitter.com/i/moments/650667182356082688" data-limit="3" data-width="400"> The Obamas' wedding anniversary </a>
JavaScript factory example
twttr.widgets.createMoment(
"650667182356082688",
document.getElementById("container"),
{
width: 400,
limit: 3
}
);