Note that in Rmarkdown files in blogdown, one must use the blogdown::shortcode function. The following example is given in the Blogdown documentation:

blogdown::shortcode('tweet', '852205086956818432')