Page 1 of 1
Embedded Tweets
Posted: September 17 15, 3:50 pm
by Transmogrified Tiger
With as much as twitter stuff gets shared, having them embedded is really helpful. We added this at NSBB and it's worked great, it adds a [tweet] tag and you put the URL of the tweet between it to embed:
http://punyweakling.com/add-a-tweet-bbc ... pbb-forum/
Re: Embedded Tweets
Posted: September 21 15, 8:54 am
by Michael
Thanks! I'll take a look!
Re: Embedded Tweets
Posted: October 20 15, 7:51 am
by thrill
We can do this now.
Re: Embedded Tweets
Posted: May 12 16, 11:41 pm
by New Pagodi
Can a similar addition be added for tumblr? It's a little different, because the post id isn't enough to construct a full code. However, tumblr does give an embed code that looks something like this:
Code: Select all
<div class="tumblr-post" data-href="https://embed.tumblr.com/embed/post/RiJu6iHoqaBbY2DtrSDo_A/144283208335" data-did="d4e6f4e2fa2cbebe4b2be0495ec913c0a9111d47"><a href="http://newpagodi.tumblr.com/post/144283208335/stlcardinals-rally-cat-did-the-cat-remember">http://newpagodi.tumblr.com/post/144283208335/stlcardinals-rally-cat-did-the-cat-remember</a></div> <script async src="https://secure.assets.tumblr.com/post.js"></script>
The result is that the script replaces the div with an iframe that shows the content of the post and looks like this:
I've done some experimenting and it seems that neither the link nor the data-did attribute are essential. The only thing that's really needed is the data-href attribute.
So could something like this be done:
BBcode usage:
Code: Select all
[tumblr]{SIMPLETEXT1}://embed.tumblr.com/embed/post/{SIMPLETEXT2}/{IDENTIFIER}[/tumblr]
HTML replacement:
Code: Select all
<div class="tumblr-post" data-href="{SIMPLETEXT1}://embed.tumblr.com/embed/post/{SIMPLETEXT2}/{IDENTIFIER}"></div> <script async src="https://secure.assets.tumblr.com/post.js"></script>
The catch is that I don't know how a user is supposed to get SIMPLETEXT2 without asking for the embed code first and then cutting out the portion they need.