Altering Embedded Tweets (oEmbed)

Creating and modifying plugins.
Post Reply
User avatar
SlidingHorn
Regular
Posts: 14
Joined: Wed Jul 28, 2010 6:14 pm

Altering Embedded Tweets (oEmbed)

Post by SlidingHorn » Fri Mar 23, 2018 2:28 am

I took a cursory look through the plugin's code in the github, but wasn't able to figure this out...

Is there a way to toggle inclusion/exclusion of elements of an embedded object? For instance, when I embed a tweet, Twitter's default is to always include a parent tweet (if it exists) and include any media. I would like to be able to choose whether or not to include that.

Twitter's default:

Code: Select all

<blockquote class="twitter-tweet" data-lang="en">
Parent tweet excluded:

Code: Select all

<blockquote class="twitter-tweet" data-conversation="none" data-lang="en">
Is there a variable in the [embed https://twitter.com/status/blahblahblah] syntax or something that controls this?

User avatar
yellowled
Regular
Posts: 6990
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: Altering Embedded Tweets (oEmbed)

Post by yellowled » Sat Mar 24, 2018 11:44 am

SlidingHorn wrote:Is there a variable in the [embed https://twitter.com/status/blahblahblah] syntax or something that controls this?
No. Embedding tweets (or embedding anything) always depends on what the "origin" gives you. The idea is that you put a (usually small) snippet in your post and that gets magically converted into what i.e. Twitter gives you. That's because they also handle styling and functionality through CSS and JS, so the result of embedding should match their expectations.

I don't use the OEmbed plugin, but from what I hear, all it does is create the embed code from a URL, so you only have to post a link to a tweet, and the plugin will handle all the embedding.

TL;DR: I think you'll have to live with what Twitter gives you.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
SlidingHorn
Regular
Posts: 14
Joined: Wed Jul 28, 2010 6:14 pm

Re: Altering Embedded Tweets (oEmbed)

Post by SlidingHorn » Sun Mar 25, 2018 1:39 am

Gotcha...it's a minor thing I can live with. Just figured I'd check.

Thanks!

Post Reply