shweshi / OpenGraph

A Laravel package to fetch Open Graph data of a website.
https://opengraph.shashi.dev
MIT License
158 stars 29 forks source link

Unable to retrieve og data for FB posts #34

Closed yashaswini closed 5 years ago

yashaswini commented 5 years ago

Hi Team, Before I speak about the issue, I would first like to say that the package does a very good job on almost all urls. Great job !

To speak about the issue I am facing, am having troubles only with retrieving og data for FB posts url. The result appears empty. However this is not the case when I use this package with twiiter urls, blogs, instagram urls. So I am here to seek some help in case am missing something in the way am accessing it.

TIA

shweshi commented 5 years ago

@Yashaswini Thanks for using the package. If possible can you please share the example url that you are trying to fetch the OG data. So that I can help you. I tried with one of the FB post and able to get the OG data.

FB link:https://m.facebook.com/fact5/photos/a.535307899852517/2403987669651188/?type=3&source=48

Tested with: https://laravelopengraph.herokuapp.com/api/fetch?url=https://m.facebook.com/fact5/photos/a.535307899852517/2403987669651188/?type=3&source=48&allMeta=true&language=en_GB

OG data: {"referrer":"default","description":"FACT added a new photo.","title":"FACT","image":"https:\/\/scontent-iad3-1.xx.fbcdn.net\/v\/t1.0-9\/fr\/cp0\/e15\/q65\/67363025_2403987672984521_4161061962446274560_n.jpg?_nc_cat=103&_nc_oc=AQklfsDQIzLwZ4WFy4xLjF6aWSo-aCP-qGIcwnuPLMfXigALggyEuLpCUe94i1OD9Ik&_nc_ht=scontent-iad3-1.xx&oh=efd2b76b0c960ff7f78c28fa22c2f99a&oe=5DB33498","url":"https:\/\/www.facebook.com\/fact5\/photos\/a.535307899852517\/2403987669651188\/?type=3"}

yashaswini commented 5 years ago

Hi, Thanks for your inputs. However, when I access the same Fb post URL(which you have mentioned) in my application using fetch() method it results in an empty result. I wonder what is going wrong.

TIA

shweshi commented 5 years ago

@Yashaswini check the package of the version and make sure it's latest 1.0.6 and it would be helpful if you can provide code snippet to further debug the issue.

shweshi commented 5 years ago

No Response. Closing this issue.

NetRally commented 3 years ago

Same issue here too. After some query try Fb need login for public contents too https://laravelopengraph.herokuapp.com/api/fetch?url=https://fb.watch/5nsZv_5BmC/

shweshi commented 3 years ago

@NetRally For me, it's working and returning the data. Is it possible to share how are you trying to fetch it? Screenshot from 2021-05-10 00-36-15

NetRally commented 3 years ago

Worked me too at the begining but after a fourth query - mixed urls also, not only the same - the fb response: {"site_name":"Facebook","url":"https:\/\/www.facebook.com\/login\/?next=https%3A%2F%2Fwww.facebook.com%2Fwatch%2F%3Fv%3D2308925129416683","locale":"en_US","locale:alternate":"ja_JP"} Happened the same on my server too. I know it is fb limitation and after still unknown time release the lock