NUKnightLab / NUKnightLab/StoryMapJS

Twitter oEmbed has changed

Open
#431 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
248
Forks
61
Avg merge
1m
Merged PRs (30d)
1

Description

The oEmbed API endpoint for embedding tweets has changed.
In (VCO.Media.Twitter.js)[https://github.com/NUKnightLab/StoryMapJS/blob/master/source/js/media/types/VCO.Media.Twitter.js] line 31, the code reads
api_url = "https://api.twitter.com/1/statuses/oembed.json?id=" + this.media_id + "&omit_script=true&include_entities=true&callback=?";
Now the pattern would be api_url = https://publish.twitter.com/oembed?url=" + this.media.id, e.g. https://publish.twitter.com/oembed?url=https://twitter.com/Interior/status/463440424141459456

I haven't looked to see what the difference is in the returned JSON, hence why I'm filing as an issue rather than forking and creating a PR.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in source/js/media/types/VCO.Media.Twitter.js at line 31 and compare the current oEmbed request with the publish.twitter.com/oembed endpoint described in the issue. Inspect the returned JSON differences and verify that Twitter embeds still render correctly after the endpoint update.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.