Comments (16)
I think it's failing because of changes on Instagram's side. (They are now omitting the 'Access-control-allow-origin' in their response)
I've opened a bug report with Facebook to see if this is actually an intended change.
from react-instagram-embed.
Hey all... it just started working again for me. The jsfiddle shared above (https://jsfiddle.net/rcfdb7w0/) is working now too. Hopefully it stays working. 🤞
from react-instagram-embed.
fucking instagram with it's constant changes...
i solved this problem by server-side script in the middle
so, instead of request to https://api.instagram.com/oembed/?omitscript=true&url=https://www.instagram.com/p/Zw9o4
you should request to something like https://yourcoolsite.com/stuff/fucking_instagram_scraper.php?omitscript=true&url=https://www.instagram.com/p/Zw9o4
content of fucking_instagram_scraper.php should be like this:
<?php
$curl = curl_init();
curl_setopt_array(
$curl,
array(
CURLOPT_AUTOREFERER => TRUE,
CURLOPT_ENCODING => 'gzip,deflate',
CURLOPT_FOLLOWLOCATION => TRUE,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_SSL_VERIFYHOST => FALSE,
CURLOPT_SSL_VERIFYPEER => FALSE,
CURLOPT_TIMEOUT => 3,
CURLOPT_URL => "https://api.instagram.com/oembed/?{$_SERVER['QUERY_STRING']}",
)
);
echo curl_exec($curl);
curl_close($curl);
of course you can add some fancy stuff like errors checking or (especially!) caching results in db/memory/fs (don't forget to serialize/unserialize data)
its works for now, until instagram broke another stuff...
p.s. sorry for my russian-english
from react-instagram-embed.
It's not working now.
from react-instagram-embed.
I've created a jsFiddle that shows the oEmbed endpoint simply cannot be queried clientside anymore.
https://jsfiddle.net/rcfdb7w0/
from react-instagram-embed.
I can confirm that it just started working for me, too, without changing anything...
And thanks to everybody that came up with a solution!!
from react-instagram-embed.
@mtryggvason any idea how fix it?
from react-instagram-embed.
From what I understand, the fetch request needs to specify that it's using jsonp when fetching from the Instagram API.
I'm not sure why it's only just stopped working now though?
from react-instagram-embed.
It was changed to json in November because of issues with jsonp:
#32
from react-instagram-embed.
Hmm, interesting @badrange. Any ideas why it's suddenly failing now?
from react-instagram-embed.
@eseQ I was thinking that I would create a proxy server and point to that using the url prop.
from react-instagram-embed.
Same issue here, any fix?
from react-instagram-embed.
Here's @NvdB31's report to Facebook:
https://developers.facebook.com/bugs/235545030662906/
Facebook have closed it:
Hi Nick, thanks for emailing. This issue is related to the legacy Instagram API (api.instagram.com) which isn't supported via this channel; this bug reporting tool only supports issues related to the Instagram Graph API. Additionally, as the legacy Instagram API has been deprecated as of July 2018, the team is no longer accepted bug reports for this API. Thanks for your understanding.
from react-instagram-embed.
Thanks @hugovk ,
Now, what do you suggest to solve this problem?
I'm temporarily embedding by iframe .. but I'm not sure if it's the most correct option ...
from react-instagram-embed.
Also just recognized this problem on our page. Any other ideas?
from react-instagram-embed.
Jesus fucking facebook. So much hassle to get some stupid ass photos for a simple page. I just built a scrapper on the server that fetches photos daily and saves them in a db giving me a simple api endpoint to hit.
from react-instagram-embed.
Related Issues (20)
- can't install this package HOT 4
- warning with peer dependencies HOT 3
- Why the major version bump to v2? Where is the breaking change?
- React Component only ouputs the client access token
- The Components did not displayed HOT 7
- `onSuccess` is being called with an error instead of `onFailure`
- 2.0.1 doesn't build with webpack 5 HOT 1
- Instagram-embed not showing due to height being 0px
- Not work for me HOT 1
- Dependency Dashboard
- Recent change of oembed to the graph api HOT 1
- Oembed view App Review HOT 4
- Not Working
- can't resolve 'querystring' in node_modules\react-instagram-embed\es' HOT 4
- cors issue instagram graphql
- componentDidUpdate - this.request is null
- ERROR in ./node_modules/react-instagram-embed/es/index.js 52:0-40 HOT 2
- 'InstagramEmbed' cannot be used as a JSX component HOT 1
- Support for React 18 HOT 2
- Action Required: Fix Renovate Configuration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-instagram-embed.