Add an Instagram Adapter to v3.x #414
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When attempting to process Instagram posts in Embed::process(), $response = $dispatcher->dispatch($url); returns an error code (429) because the URL does not use the IG endpoint with the access token. (On localhost environments it returns 200, but not when it's on a production server).
Since the response has an error code, The default Webpage adapter it uses fails on $adapter::check($response) and it never gets a chance to check the url with the correct endpoint and token.
Here I added an adapter file for Instagram that passes for 200 or 429 codes
I'm not sure if Facebook posts need to do this as well, since they both require the same token.
see my initial comment here: #411 (comment)