BBCode for embedding a tweet in phpBB

Probably not perfect, but it works.

BBCode:


Replacement:


function loadx(data) {
	document.write(data.html);
}

https://api.twitter.com/1/statuses/oembed.json?id=IDENTIFIER&callback=loadx

3 responses to “BBCode for embedding a tweet in phpBB”

  1. […] to Evan Hoffman. bbcode embed phpBB tweet […]

  2. Wouldn’t that be risky is someone added a dodgy JS file?

    1. Yeah, I suppose it leaves you open to cross-site scripting vulnerabilities, but a phpbb forum isn’t a banking site. The forum on which I used this is private and only has about 40 users, none of whom would do such a thing.