Here’s what I’d like to setup as a plugin.
Not sure where to begin and how this would work. Perhaps this can be done using onebox or something else?
I’d like to be able to create a more generic embedding interface - Onebox is ok, but not in my use case ( lots of links being posted and we want richer descriptions and one single template to rule the all).
First let me get this out of the way - there is a free tier at Embed.Ly which allows 5000 oembed calls.
With the build in onebox, I get this:
With embedly’s oembed API I get this:
{
"provider_url":"http://www.scmp.com",
"description":"Cynics in the local media like to say: there's no such thing as the most absurd, only the more absurd. The Cantonese saying may not translate well, but the message is clear - just when we think we have seen everything, something more bizarre will...",
"title":"Hong Kong's Latest Epidemic: Ridiculitis",
"thumbnail_width":620,
"url":"http://www.scmp.com/comment/blogs/article/1843326/hong-kongs-latest-epidemic-ridiculitis",
"thumbnail_url":"http://cdn1.i-scmp.com/sites/default/files/styles/620x356/public/2015/07/24/scmp_12jul15_ns_water2_wck_8437_51367695.jpg?itok=PCZWcd6e",
"version":"1.0",
"provider_name":"South China Morning Post",
"type":"link",
"thumbnail_height":356
}
For a facebook video from another thread, I get this:
{
"provider_url":"http://www.facebook.com",
"description":"THE \"ZOMBIE APOCALYPSE TRUCK\" -> Dima Koslowski",
"title":"Dima Koslowski - Timeline | Facebook",
"author_name":"Dima Koslowski",
"height":400,
"thumbnail_width":160,
"width":500,
"html":"<iframe class=\"embedly-embed\" src=\"//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.facebook.com%2Fvideo%2Fembed%3Fvideo_id%3D879922095450656&url=https%3A%2F%2Fwww.facebook.com%2Fdima.koslowski%2Fvideos%2F879922095450656%2F&image=https%3A%2F%2Fscontent.xx.fbcdn.net%2Fv%2Ft15.0-10%2Fs160x160%2F12496571_879937415449124_521787180_n.jpg%3Foh%3Dd435f3b9eade0643e79f6b7f2d6d82b3%26oe%3D5831128A&key=430136d4c9274a4e91e08196f6a76460&type=text%2Fhtml&schema=facebook\" width=\"500\" height=\"400\" scrolling=\"no\" frameborder=\"0\" allowfullscreen></iframe>",
"author_url":"http://facebook.com/557079631068239",
"version":"1.0",
"provider_name":"Facebook",
"thumbnail_url":"https://scontent.xx.fbcdn.net/v/t15.0-10/s160x160/12496571_879937415449124_521787180_n.jpg?oh=d435f3b9eade0643e79f6b7f2d6d82b3&oe=5831128A",
"type":"video",
"thumbnail_height":160
}
Can someone suggest a few areas I could look at to bring this into discourse?
The API is called using this:
http://api.embed.ly/1/oembed?url=https://www.facebook.com/dima.koslowski/videos/879922095450656/&height=400&width=500&key=ADD_YOUR_OWN_KEY