Altering Embedded Tweets (oEmbed)

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

Altering Embedded Tweets (oEmbed)

Post by SlidingHorn »

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?
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Altering Embedded Tweets (oEmbed)

Post by yellowled »

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
SlidingHorn
Regular
Posts: 18
Joined: Wed Jul 28, 2010 6:14 pm

Re: Altering Embedded Tweets (oEmbed)

Post by SlidingHorn »

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

Thanks!
Post Reply