Skip to content

Conversation

@dgw
Copy link
Member

@dgw dgw commented Dec 12, 2020

Description

As reported in #1996, Facebook "deprecated" the oEmbed API endpoint. However, instead of a true deprecation where the endpoint simply starts returning a warning (or even just is marked as deprecated in docs), FB essentially removed the endpoint. It no longer returns valid JSON at all, let alone the expected result. Sopel receives plain text stating that the endpoint is "deprecated", with a link for more details.

The replacement API endpoint requires an API key, and this seems like a good time to consider removing the Instagram plugin to its own package. I will prepare that change separately, mostly so this fix can be easily cherry-picked into 7.0.x for maintenance, but also because it could be enough to wait for removing the plugin entirely until Sopel 8.0.

I'm not personally signed up for Instagram's developer program, so it wouldn't be fair if I alleged that FB never sent a warning before this endpoint stopped working. They might have. I'm just taking issue with the use of the term "deprecated" for something that is nonfunctional rather than merely unmaintained or scheduled for removal.

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
  • I have tested the functionality of the things this change touches (note: minimally)

Notes

Requesting review from @kwaaak specifically, as the original plugin author.
@cottongin I'd love a review from you, too, since the fallback logic I'm gutting is from your PR #1911.

I intend to backport this tweak onto 7.0.x, for release as soon as this is merged, since the "Unexpected error" messages described in #1996 are pretty ugly.

As reported in #1996, Facebook "deprecated" the oEmbed API endpoint.
However, instead of a true deprecation where the endpoint simply starts
returning a warning (or even just is marked as deprecated in docs), FB
essentially *removed* the endpoint. It no longer returns valid JSON at
all, let alone the expected result. Sopel receives plain text stating
that the endpoint is "deprecated", with a link for more details.

The replacement API endpoint requires an API key, and this seems like a
good time to consider removing the Instagram plugin to its own package.
I will prepare that change separately, mostly so this fix can be easily
cherry-picked into 7.0.x for maintenance, but also because it could be
enough to wait for removing the plugin entirely until Sopel 8.0.

I'm not personally signed up for Instagram's developer program, so it
wouldn't be fair if I alleged that FB never sent a warning before this
endpoint stopped working. They might have. I'm just taking issue with
the use of the term "deprecated" for something that is *nonfunctional*
rather than merely unmaintained or scheduled for removal.
@dgw dgw added Low Priority Tweak Bugfix Generally, PRs that reference (and fix) one or more issue(s) labels Dec 12, 2020
@dgw dgw added this to the 7.1.0 milestone Dec 12, 2020
@dgw dgw requested a review from kwaaak December 12, 2020 18:27
@dgw dgw mentioned this pull request Dec 12, 2020
4 tasks
@kwaaak
Copy link
Contributor

kwaaak commented Dec 25, 2020

Does this still work for anyone? Maybe if the bot runs on an innocent residential IP?
Requests from anything resembling a server are flat-out denied.
I feel like the "Instagram is probably blocking my IP address. :( error generates a false hope that this is ever going to work again.
Fail silently? Remove completely and get an ugly generic <title> display?

@dgw
Copy link
Member Author

dgw commented Dec 25, 2020

I couldn't actually test from my home IP until today, but no dice here either. My local Sopel instance spits out the same JSONDecodeError as my server-hosted one.

Maybe we should just close this, merge #2000, and rebuild the plugin using the key-based API access in its own package? That was always going to be the future, but it looks like this stopgap won't help anything despite what I hoped.

@kwaaak
Copy link
Contributor

kwaaak commented Dec 25, 2020

There is a Python library on Github/PyPI which could be the nuts and bolts of a standalone plugin. No developer account needed, works with username and password.
I have not tested it myself. It might not be healthy to use your account with it, but it is a more realistic way than getting access to the proper API.

@dgw dgw removed this from the 7.1.0 milestone Jan 2, 2021
@dgw dgw added the Declined Requests that will not be implemented for technical or project direction reasons label Jan 2, 2021
@dgw
Copy link
Member Author

dgw commented Jan 2, 2021

Closing in favor of #2000 and a new standalone plugin package.

@dgw dgw closed this Jan 2, 2021
@dgw dgw deleted the instagram-oembed-dead branch January 2, 2021 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix Generally, PRs that reference (and fix) one or more issue(s) Declined Requests that will not be implemented for technical or project direction reasons Low Priority Tweak

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants