Render Blockquote HTML from GET?



I am using GET/statuses/user_timeline and storing each tweet. The returned blockquote html for each tweet is injected into the page, but it is not rendering. I just see the HTML

<blockquote class="twitter-tweet"><p lang="en" dir="ltr"><a href="">@Amy_Siskind</a> please keep writing these</p>&mdash; Julien Smith (@julien) <a href="">January 21, 2017</a></blockquote> <script async src="//" charset="utf-8"></script>

What is the best pattern to take the result of our call and have it render on the page? Perhaps I need to take each tweet and pass it to the oembed url as a parameter?

Thanks for any insight!


How are generating the html? Seems like it’s being sanitized somewhere along the way.


Are you retrieving the Tweets from the /oembed endpoint? I’m not aware that /statuses/user_timeline returns embeddable HTML.


Yes we were hitting that oembed endpoint once we have the tweetId. We ended up getting it working by using twttr.widgets.createTweet with the tweet Id via script on the HTML page. Much cleaner.

Thank you!