# Ability to embed Tweets in posts

**URL:** https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653
**Category:** Feature
**Created:** [September 2, 2016, 11:30pm UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653 "2016-09-02T23:30:15Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![charleswalter](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/charleswalter/32/116433_2.png) [@charleswalter](https://meta.discourse.org/u/charleswalter)
#### Post date: [September 2, 2016, 11:30pm UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/1 "2016-09-02T23:30:15Z")

</div>

To help drive engagement, we were thinking of curating some posts that could include embedded tweets. Any thoughts on allowing a twitter url for a tweet to be interpreted with the Twitter embed code? Or perhaps other ideas of how we could support the integration of content from Twitter?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [September 2, 2016, 11:32pm UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/2 "2016-09-02T23:32:06Z")

</div>

Do you have any examples? How’s that different from Twitter onebox?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [September 2, 2016, 11:33pm UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/3 "2016-09-02T23:33:15Z")

</div>

AFAICT it works here unless you mean something different

> [@Is there a preferred IDE for Discourse dev?](https://meta.discourse.org/t/is-there-a-preferred-ide-for-discourse-dev/49312/5):
>

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [September 2, 2016, 11:36pm UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/4 "2016-09-02T23:36:00Z")

</div>

Are you looking to have the tweet styled similarly to the way it looks on [twitter.com](http://twitter.com) itself, and sites like storify?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 2, 2016, 11:56pm UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/5 "2016-09-02T23:56:02Z")

</div>

This already works, provided you entered a Twitter API key in site settings, e.g.:

> <https://twitter.com/oneraindrop/status/771842508716249088>

Just paste the URL on a line by itself, as with any other onebox:

`https://twitter.com/oneraindrop/status/771842508716249088`

---

<div class="post-metadata">

### Author: ![charleswalter](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/charleswalter/32/116433_2.png) [@charleswalter](https://meta.discourse.org/u/charleswalter)
#### Post date: [September 3, 2016, 12:06am UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/6 "2016-09-03T00:06:54Z")

</div>

Cool. Going to try it now.

---

<div class="post-metadata">

### Author: ![charleswalter](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/charleswalter/32/116433_2.png) [@charleswalter](https://meta.discourse.org/u/charleswalter)
#### Post date: [September 3, 2016, 12:08am UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/7 "2016-09-03T00:08:02Z")

</div>

The comment I received from @Urrunaga was that the photos weren’t appearing when she tried it. I guess it depends on the way the photo was uploaded to Twitter. Seems to work well. (or perhaps she didn’t grab the link to the tweet properly)

> <https://twitter.com/elchiflamicas/status/771766510285094912>

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 3, 2016, 12:16am UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/8 "2016-09-03T00:16:12Z")

</div>

You need to have Twitter API keys set up in your site settings for that to work.

---

<div class="post-metadata">

### Author: ![tjb1013](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tjb1013/32/120402_2.png) [@tjb1013](https://meta.discourse.org/u/tjb1013)
#### Post date: [November 26, 2016, 7:27pm UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/9 "2016-11-26T19:27:03Z")

</div>

> [@codinghorror](#):
>
> You need to have Twitter API keys set up in your site settings for that to work.

Can’t find where to put this … only see API keys for authentication… are they pulled from there?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [November 26, 2016, 7:34pm UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/10 "2016-11-26T19:34:01Z")

</div>

Yes they are. So enable that.

---

<div class="post-metadata">

### Author: ![tjb1013](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tjb1013/32/120402_2.png) [@tjb1013](https://meta.discourse.org/u/tjb1013)
#### Post date: [November 26, 2016, 7:46pm UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/11 "2016-11-26T19:46:03Z")

</div>

> [@codinghorror](#):
>
> Yes they are. So enable that.

Did that, now Tweets don’t embed at all.

I didn’t create a working application, just got far enough to generate the consumer and access keys and secrets.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [November 26, 2016, 7:46pm UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/12 "2016-11-26T19:46:57Z")

</div>

I believe it needs to be fully configured as Twitter requires that for API access.

---

<div class="post-metadata">

### Author: ![tjb1013](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tjb1013/32/120402_2.png) [@tjb1013](https://meta.discourse.org/u/tjb1013)
#### Post date: [November 26, 2016, 8:05pm UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/13 "2016-11-26T20:05:14Z")

</div>

> [@codinghorror](#):
>
> I believe it needs to be fully configured as Twitter requires that for API access.

Yeah, that did it. Thanks so much.

---

<div class="post-metadata">

### Author: ![alexs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexs/32/139956_2.png) [@alexs](https://meta.discourse.org/u/alexs)
#### Post date: [September 11, 2018, 1:46pm UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/14 "2018-09-11T13:46:48Z")

</div>

Just to help out anyone else who needs to go through this process, in order to set up the rich embeds, you’ll need to:

- Register for a developer account with twitter - [https://developer.twitter.com/](https://developer.twitter.com/)
- Once you’ve been approved (this took about a week for me) then..
- Create a new app for your twitter developer account (you only need to complete the required fields on the form)
- Enter the app’s Twitter Consumer Key & Twitter Consumer Secret in your Discourse site’s settings - you’ll find those fields in in `admin > login`
- Refresh your browser window, then paste a tweet into a post as usual

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [September 13, 2018, 10:09am UTC](https://meta.discourse.org/t/ability-to-embed-tweets-in-posts/49653/15 "2018-09-13T10:09:43Z")

</div>

> [@Configuring X login and rich embeds for Discourse](https://meta.discourse.org/t/configuring-twitter-login-for-discourse/13395):
>
> bookmark This guide explains how to set up Twitter login and rich embeds for your Discourse forum. person_raising_hand Required user level: Administrator warning In order for rich embeds to work properly, a Basic plan or higher for X Dev is mandatory. Rich embeds will not work with the Free X Dev plan. X Configuration Go to the [Developer Portal](https://developer.twitter.com/en/portal/projects-and-apps) on X. Choose between a Free, Basic, or Pro X Dev plan and complete the developer agreement and policy requirements. After completing …
