Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
You would need to activate the oEmbed Provider module - then all of your node/123 url:s will be exposed through oEmbed. The workflow and customization of this should be improved though - but it's at least working for now :)
I did that and it does not seem to work.
Anyway, I would like to customize the embed code, my nodes contain CCK videos fields and I need the videos to be embeddable.
If I remember correctly you can override the "oembed_node" theme function to customize what the embed looks like. Currently no other types than rich is supported though - that would need further development.
I can see in the last release there are hooks for theming.
However, when I navigate to /services/oembed I get 404
I saw in the code that the oEmbed Provider module seems to expose its API on /oembed/endpoint but when I navigate to /oembed/endpoint?url=http%3A//localhost/node/2 I get the following response:
{"type":"rich","version":"1.0","provider_name":"blah","width":0,"height":0,"title":"Not found","error":1,"html":"Could not find a provider that supports this url"}
Even if I finally find how /oembed/endpoint is working how's Facebook supposed to embed my posts given the spec says the API endpoint should be /services/oembed?
UPDATE:
I just made a test asking the embed code of a youtube video to my server on /oembed/endpoint and it worked!!!
I think something is upside down, I don't want my site to be an oEmbed provider for YouTube but for my own content.
Hi, I found two things that could help solving my problems with this module :)
1. "Could not find a provider that supports this url" issue
despite what I put in the previous comment my urls are in the form "node/nodeId" I use nice urls and pathauto. However the regex that is used in the oembedprovider hook of oembedprovider module specify node/* (line 80 of oembedprovider.module)
and now the API is returning something (though I will have to theme the output I guess)
2. API endpoint
After some research I was baffled by the fact that no provider is actually using the same API endpoint and realized that it was actually not enforced in the specifications...
There, I thought that oEmbed was useless if I need to ask Facebook (or any oEmbed plugin provider) to register my site in their list of providers. I then found out that some providers are specifying the API endpoint in the headers of the resource. For example, YouTube have this kind of thing in their headers:
<link rel="alternate" type="application/json+oembed" href="http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch?v%3Dp9b4os8S1U4&format=json" title="Thank You" />
<link rel="alternate" type="text/xml+oembed" href="http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch?v%3Dp9b4os8S1U4&format=xml" title="Thank You" />
But Flickr doesn't...
I am going to try add that to my site and see what happens.
@flying: Most oEmbed consumers will need to add information about providers prior to embedding content from them and especially so with Embed.ly. I actually don't know if Embed.ly consumes oEmbed itself or if it's only an oEmbed provider.
As stated in #7 there is a simple autodiscovery mechanism in the oEmbed standard but I haven't bothered supporting it yet since the way it's now constructed would make it very hard to use by consumers. The autodiscovery should be built around patterns, not around absolute URL:s so I would probably push for a new standard rather than implementing the current one - if no one can show any important consumers of the current standard that is.
I still haven't got time revisiting the provider part of this module either - unfortunately.
D6 reached its EOL back in February 2016, and there is no active release for D6 for this module anymore.
Development or support is not planned for D6. All D6-related issues are marked as outdated in a bunch.
Comments
Comment #1
Flying Drupalist commentedSubscribe
Comment #2
voxpelli commentedYou would need to activate the oEmbed Provider module - then all of your node/123 url:s will be exposed through oEmbed. The workflow and customization of this should be improved though - but it's at least working for now :)
Comment #3
cvedovini commentedI did that and it does not seem to work.
Anyway, I would like to customize the embed code, my nodes contain CCK videos fields and I need the videos to be embeddable.
Comment #4
voxpelli commentedIf I remember correctly you can override the "oembed_node" theme function to customize what the embed looks like. Currently no other types than rich is supported though - that would need further development.
Comment #5
cvedovini commentedI can see in the last release there are hooks for theming.
However, when I navigate to /services/oembed I get 404
I saw in the code that the oEmbed Provider module seems to expose its API on /oembed/endpoint but when I navigate to /oembed/endpoint?url=http%3A//localhost/node/2 I get the following response:
Even if I finally find how /oembed/endpoint is working how's Facebook supposed to embed my posts given the spec says the API endpoint should be /services/oembed?
UPDATE:
I just made a test asking the embed code of a youtube video to my server on /oembed/endpoint and it worked!!!
I think something is upside down, I don't want my site to be an oEmbed provider for YouTube but for my own content.
Comment #6
voxpelli commentedI will digg deeper into this issue when I've time
Comment #7
cvedovini commentedHi, I found two things that could help solving my problems with this module :)
1. "Could not find a provider that supports this url" issue
despite what I put in the previous comment my urls are in the form "node/nodeId" I use nice urls and pathauto. However the regex that is used in the oembedprovider hook of oembedprovider module specify node/* (line 80 of oembedprovider.module)
I replaced it with the following:
and now the API is returning something (though I will have to theme the output I guess)
2. API endpoint
After some research I was baffled by the fact that no provider is actually using the same API endpoint and realized that it was actually not enforced in the specifications...
There, I thought that oEmbed was useless if I need to ask Facebook (or any oEmbed plugin provider) to register my site in their list of providers. I then found out that some providers are specifying the API endpoint in the headers of the resource. For example, YouTube have this kind of thing in their headers:
But Flickr doesn't...
I am going to try add that to my site and see what happens.
Regards
Comment #8
Flying Drupalist commentedDo you have to ask embed.ly or some other service to add your site?
@cvedovini hows it going?
Comment #9
voxpelli commented@flying: Most oEmbed consumers will need to add information about providers prior to embedding content from them and especially so with Embed.ly. I actually don't know if Embed.ly consumes oEmbed itself or if it's only an oEmbed provider.
As stated in #7 there is a simple autodiscovery mechanism in the oEmbed standard but I haven't bothered supporting it yet since the way it's now constructed would make it very hard to use by consumers. The autodiscovery should be built around patterns, not around absolute URL:s so I would probably push for a new standard rather than implementing the current one - if no one can show any important consumers of the current standard that is.
I still haven't got time revisiting the provider part of this module either - unfortunately.
Comment #10
toemaz commentedUse template.php to override the standard theme_oembed_node function:
Comment #11
jlyon commentedThis worked great for me.
Comment #12
socialnicheguru commentedCan you outline the steps necessary to make my site an oembed provider.
Comment #13
theodorosploumisI am looking for any Documentation about this too. Could not find anything except that the path for embed is:
/oembed/endpoint?url=Comment #14
astonvictor commentedD6 reached its EOL back in February 2016, and there is no active release for D6 for this module anymore.
Development or support is not planned for D6. All D6-related issues are marked as outdated in a bunch.