GithubHelp home page GithubHelp logo

Comments (16)

NvdB31 avatar NvdB31 commented on August 11, 2024 8

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.

mwadden avatar mwadden commented on August 11, 2024 7

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.

zebroid avatar zebroid commented on August 11, 2024 6

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.

ramsrib avatar ramsrib commented on August 11, 2024 6

It's not working now.

from react-instagram-embed.

NvdB31 avatar NvdB31 commented on August 11, 2024 3

I've created a jsFiddle that shows the oEmbed endpoint simply cannot be queried clientside anymore.

https://jsfiddle.net/rcfdb7w0/

from react-instagram-embed.

FelixButzbach avatar FelixButzbach commented on August 11, 2024 2

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.

eseQ avatar eseQ commented on August 11, 2024

@mtryggvason any idea how fix it?

from react-instagram-embed.

Ben-Davis1 avatar Ben-Davis1 commented on August 11, 2024

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.

badrange avatar badrange commented on August 11, 2024

It was changed to json in November because of issues with jsonp:
#32

from react-instagram-embed.

Ben-Davis1 avatar Ben-Davis1 commented on August 11, 2024

Hmm, interesting @badrange. Any ideas why it's suddenly failing now?

from react-instagram-embed.

mtryggvason avatar mtryggvason commented on August 11, 2024

@eseQ I was thinking that I would create a proxy server and point to that using the url prop.

from react-instagram-embed.

zanderisrael avatar zanderisrael commented on August 11, 2024

Same issue here, any fix?

from react-instagram-embed.

hugovk avatar hugovk commented on August 11, 2024

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.

taniabarreira avatar taniabarreira commented on August 11, 2024

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.

FelixButzbach avatar FelixButzbach commented on August 11, 2024

Also just recognized this problem on our page. Any other ideas?

from react-instagram-embed.

siemiatj avatar siemiatj commented on August 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.