Skip to content

Embedding tweets breaks when the account goes private #248

@richburroughs

Description

@richburroughs

Describe the bug
It looks like embedded tweets fail when the account goes private. We use Netlify and our build broke.

I know the person who had made the tweet and she did go private for a bit right before we got the error.

We saw this in the logs:

ERROR 2022/10/31 16:38:49 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?hide_thread=1&id=1334188913724850177": Failed to retrieve remote file: Forbidden, body: "{"error":"Sorry, you are not authorized to see this status.","request":"\/1\/statuses\/oembed.json?hide_thread=1&id=1334188913724850177"}"

To Reproduce
Steps to reproduce the behavior:

  1. Embed a tweet
  2. Set the Twitter account to private
  3. See error

Expected behavior

Something less brittle. I think I'd probably expect it to just not display the tweet but log something.

On a related topic, I expect more people will be deleting accounts too with everything happening there at Twitter, too. Not sure how the code handles that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions