OEmbed
-
Hello
I would like to build custom oembed handler. I followed the examplle form https://codex.ww.wp.xz.cn/Function_Reference/wp_embed_register_handler#Examples
(also the updated vesion) but I still see in cosole that:
{“code”:”oembed_invalid_url”,”message”:”Not Found”,”data”:{“status”:404}}
Request created was:
http://localhost:8000/wp-json/oembed/1.0/proxy?url=https%3A%2F%2Fwww.forbes.com%2Fvideo%2F6138095413001%2F&_locale=userAny ideas?
-
Did you check if Forbes does have support for their content to be embedded on-the-fly inside other websites?
As far as I could tell, you’d need to first agree on a license with them if you’re going to reuse any of their content outside of their own website.Hi
Not sure thats the case, as direct link to embed link works nicely: http://players.brightcove.net/2097119709001/598f142b-5fda-4057-8ece-b03c43222b3f_default/index.html?videoId=6139157952001. They even provide the embed code on their website.I tested with some other websites, and ended up with the same error message.
A functioning embed link does not mean the server is a valid oEmbed provider. I’m not saying the target is not, only that an embed link is not evidence of it. Typically oEmbed providers include a
<link>meta tag for discovery with an attributetype="application/json+oembed"ortype="application/xml+oembed"where the tag’s href attribute is the page’s oEmbed endpoint. The oEmbed spec does not require discovery, but then it could require some digging to learn the right endpoint.
The topic ‘OEmbed’ is closed to new replies.