Twitter Native Embed

btw, i don’t know how busy your forum is or how often x/twitter oneboxes are posted, but the basic free twitter plan does work for default oneboxes - it just rate limits to about 1 onebox request per 15 minutes. i have it running on a relatively busy forum and it only seems to limit when people try to post more than one onebox link in a post.

3 Likes

Unfortunately, i just discovered this stops a lot of YouTube (ie https://youtu.be/) from being embedded because the links redirect to YouTube.

People post far more YouTube links than they ever post X posts. So I’ve disabled for now and will simply edit x.comtwitter.com for now.

2 Likes

We very rarely have any x/twitter posts mentioned. And Twitter.com oneboxes do work, but X.com do not.

are you sure? i don’t mean this component, i mean the native onebox using a twitter developer free plan api token and with this component disabled. you say you are being hosted - they should be able to set up the default oneboxing like that exists here on Meta.

i have the rich x/twitter embedding for free on 2 different self hosted sites. i use this component when the x/twitter api breaks for whatever reason and just toggle it on and off as needed then.

5 Likes

I set up a developer free account for X. I am wondering how you get a Twitter one box for embedding?

I have the Native Twitter Embed component working fine, but I am wanting to post in dark mode.

It seems that on some recent Discourse versions, disabling Twitter/X oneboxes does not work well.
Also, this theme component does not work correctly on already existing oneboxes.

I have added some functionality that, in addition to replacing the bare links with a native embed, also looks for Twitter oneboxes, and then does the same thing.

That means there is no need to disable oneboxing or rebuild old posts any more.

PR here Feature: support existing oneboxes by communiteq · Pull Request #1 · Lhcfl/discourse-twitter-native-embed · GitHub

1 Like