Ability to embed Tweets in posts

(Charles Walter) #1

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?

(Rafael dos Santos Silva) #2

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

(Mittineague) #3

AFAICT it works here unless you mean something different

(Matt Palmer) #4

Are you looking to have the tweet styled similarly to the way it looks on twitter.com itself, and sites like storify?

(Jeff Atwood) #5

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

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


(Charles Walter) #6

Cool. Going to try it now.

(Charles Walter) #7

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)

(Jeff Atwood) #8

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

(Tim) #9

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

(Jeff Atwood) #10

Yes they are. So enable that.

(Tim) #11

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.

(Jeff Atwood) #12

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

(Tim) #13

Yeah, that did it. Thanks so much.

(Alex Sherwood) #14

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/
  • 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

(Erlend Sogge Heggen) #15