Embed tweet in a text

Hi again

Sorry about the very late response. I am not sure if this is still relevant, but I had typed up a response to you back in October I somehow never managed to submit. If you have found a solution, please feel free to share this such that others can benefit in the future!

If you are merely interested in displaying a specific tweet, embedding it in an iframe is certainly a reasonable approach. I am not sure what you used to generate the above, but I think you might be making it more complicated than it needs to be.

Indeed, if it is just a single tweet of interest, I would recommend going through https://twitframe.com/ and simply copying the specific tweet, e.g. https://twitter.com/CERN/status/1445418510751043587. Combine the two and create

https://twitframe.com/show?url=https://twitter.com/CERN/status/1445418510751043587

All you need to do then is to add the following wherever:

<iframe 
    border="0" 
    frameborder="0" 
    height="250" 
    width="550"
    src="https://twitframe.com/show?url=https://twitter.com/CERN/status/1445418510751043587">
</iframe>

This, however, does not solve the height issue as you also encountered. Indeed, the height issue concerns the iframe itself as opposed to the actual tweet. What you are interested in doing is to dynamically adjust the size of the iframe depending on the content loaded within. One way of doing this, as outlined by the author of Twitframe, is by using jQuery. That said, since you are only interested in displaying a specific tweet, you should just specify the height parameter to a size appropriate for your specific tweet.

Thanks!