Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No working oembed URLs #181

Open
onigetoc opened this issue Sep 18, 2023 · 7 comments
Open

No working oembed URLs #181

onigetoc opened this issue Sep 18, 2023 · 7 comments

Comments

@onigetoc
Copy link

Some work on some Oembed on node project lie (node-oembed), and some do not work from your's.
This one work with:

Not working with oembed-extractor:

for example: this one do not work with oembed but work on your's [oembed-extractor].

With PHP i used this one and it's really good. May be your can be inspired to custom some to make many more to work.
https://github.com/oscarotero/Embed/
I suggested him to add: Pinterest and some more.
I customized some myself to add more providers with a embed service but without Oembed infos in the header.
like - https://www.bitchute.com/video/8hXWnkvA8Ao/

Check for code or iframe:

@ndaidong
Copy link
Collaborator

Thank you for your suggestion. My lib only focuses on the oembed api, and does not extract meta tag from the webpage, so it does not support something like twitter cards or open graph properties. But I may consider to implement that in the future.

@onigetoc
Copy link
Author

onigetoc commented Sep 19, 2023

I may suggest adding the most important one like Facebook post, videos ect.
These Facebook feeds have to be from accounts and page public with no sharing and view restriction. Published to all.
To view to post only it's like Twitter, clicking the post time.
https://developers.facebook.com/docs/plugins/embedded-posts/
https://developers.facebook.com/docs/plugins/embedded-video-player/

Twitter already work well.

I think if you find the right id it will work. But i think that some meta should be read like title, description ect.
for Facebook there's something to modify if it's video post ect.

IFRAME:

Post:
<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2F20531316728%2Fposts%2F10154009990506729%2F&width=500&show_text=false&height=292&appId" width="500" height="292" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>

Video:
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Ffacebook%2Fvideos%2F10153231379946729%2F&width=500&show_text=true&height=371&appId" width="500" height="371" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share" allowFullScreen="true"></iframe>

The Oembed json file will have to be done reading the header meta i guest.
I already did that in the past but in php.

UPDATE: I did some test and i think it may not work because with JavaScript you are not logged in. mmm....
May be with node... i don't know.

But my own php version give me this:

image

@ndaidong
Copy link
Collaborator

With Facebook and Instagram, this lib requires to set app id and client token, as the doc here. I'm not sure that we can read these data without credentials.

@onigetoc
Copy link
Author

For Facebook, it will work with public post (My result confirm it work with php). I do not know if it will work with javascript and node.

Example from NBC SPORT:
https://oscarotero.com/embed3/demo/index.php?url=https://www.facebook.com/NBCSports/videos/272467038989271/

Same with normal posts:

@ndaidong
Copy link
Collaborator

@onigetoc what it showed is not oembed data but come from the webpage's meta tags. It find the oembed url but could not load the oembed without credentials.

Screenshot from 2023-09-22 10-09-46

My oembed-extractor follows oEmbed standard:

oEmbed is a format for allowing an embedded representation of a URL on third party sites. The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the resource directly.

So I don't have plan to parse the meta data from target page. I may create another project for that purpose in the future and this lib can use that package as a dependency.

@CorySanin
Copy link

Some other services would work without explicitly being added to the list of providers should you implement oEmbed's method of discovery. For example, that bitchute page has discoverable oEmbed data.

@ndaidong
Copy link
Collaborator

@CorySanin yeah, this is a great suggestion.

ndaidong added a commit that referenced this issue May 7, 2024
- Add auto discovery support (#181)
- Sync to the last provider list
- Update examples dependencies
@ndaidong ndaidong mentioned this issue May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants