Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#36197 closed defect (bug) (fixed)

Update Twitter oEmbed URL

Reported by: niallkennedy Owned by: ocean90
Priority: normal Milestone: 4.5
Component: Embeds Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

Twitter moved its preferred oEmbed URL for single Tweets from api.twitter.com to publish.twitter.com.

Update the oEmbed provider array to point at the new preferred endpoint, matching autodiscovery behavior. The ​XML response format will be removed.

Example URL:
​https://twitter.com/WordPress/status/690269689855942657

Attachments (3)

36197.diff​ (1.3 KB ) - added by niallkennedy 11 years ago.
36197.2.diff​ (1.4 KB ) - added by ocean90 11 years ago.
36197.3.diff​ (1.6 KB ) - added by ocean90 11 years ago.

Download all attachments as: .zip

Change History (14)

@niallkennedy
11 years ago

#1 @niallkennedy
11 years ago

  • Keywords has-patch added

#2 @jorbin
11 years ago

  • Milestone Awaiting Review → 4.5
  • Type enhancement → defect (bug)

As twitter is deprecating the XML on May 1, I think this is a good fix to get in for 4.5

@ocean90
11 years ago

#3 @ocean90
11 years ago

  • Version trunk

36197.2.diff​ adds support for moments, which are supported by the new endpoint, see ​https://dev.twitter.com/web/embedded-moments/oembed.

#4 @jorbin
11 years ago

  • Owner set to jorbin
  • Resolution → fixed
  • Status new → closed

In 36946:

Update Twitter oEmbed URL.

Twitter moved its preferred oEmbed URL for single Tweets from api.twitter.com to publish.twitter.com. They also are deprecating XML responses.

Props niallkennedy.
Fixes #36197.

#5 @jorbin
11 years ago

  • Resolution fixed
  • Status closed → reopened

#6 @jorbin
11 years ago

  • Owner changed from jorbin to ocean90
  • Status reopened → assigned

@ocean90 Do you want to add the moments support? Is that not covered by the current autodiscovery?

#7 @ocean90
11 years ago

@jorbin Autodiscovery works only if the page includes the link tag, ​https://twitter.com/i/moments/650667182356082688 has none. A single tweet like ​https://twitter.com/sonicadvance1/status/706219050473549824 includes one though.

@niallkennedy Is this something which Twitter is planning to implement?

#8 @niallkennedy
11 years ago

We will return an oEmbed response from the same API URL for Moment and collection URLs today. We plan to add autodiscovery.

#9 @ocean90
11 years ago

Thanks @niallkennedy, I'm going to add support for the new URLs.

Autodiscovery doesn'T work for these because wp_filter_oembed_result() filters the HTML data.

Version 0, edited 11 years ago by ocean90 (next)

@ocean90
11 years ago

#10 @ocean90
11 years ago

  • Resolution → fixed
  • Status assigned → closed

In 36954:

oEmbed: Extend the provider list to support moments and timelines from Twitter.

Fixes #36197.

#11 @DrewAPicture
11 years ago

In 37038:

Docs: Add Twitter timelines and moments to the table in the hook doc for the oembed_provders filter, introduced in [36954].

See #36197. See #35986.

Note: See TracTickets for help on using tickets.