Chrome Extension

Add Tweet on AMP web page

To display a tweet on the AMP webpage add the below script and HTML markup to your AMP webpage.
<!--Add below script within head tag-->
<script async custom-element="amp-twitter" src="https://cdn.ampproject.org/v0/amp-twitter-0.1.js"></script>

<!--Add below html to within body tag-->
<amp-twitter
  width="486"
  height="657"
  layout="responsive"
  data-tweetid="152346163703417320">
</amp-twitter>
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool

data-tweetid is a required attribute used in <amp-twitter> tag. This is id of the tweet that you want to show on your AMP webpage.

Search Index Data (The code snippet can also be found with below search text)

display tweet AMP
Was this helpful?
0 Comments
Join Devsheet Ask a Question