Facebook Onebox embed

(Vinoth Kannan) #1

Facebook Onebox

Simply embed your Facebook posts and videos in your posts by adding URLs

GitHub - vinkashq/discourse-facebook-onebox: Facebook Onebox plugin for Discourse

Supported oEmbed endpoints

Of course, can embed only public posts and videos






before expand

After expand

Facebook onebox
How do I make "Onebox" look better?
Posting a Facebook post, how?
(@SenpaiMass) #3

this is awesome, thanks for the plugin. Possible to PR it to the official one box so we all can use it by default?

(Vinoth Kannan) #5

I will do if the team want

(Erlend Sogge Heggen) #6

Unfortunately we do not support oneboxes with variable height in post stream. That’s exactly why we are not supporting official Twitter & Imgur embed code.

(Vinoth Kannan) #7

Yes. We have to fix dynamic height problem before merging to core.

I have idea to deliver expandable embeds to fix this issue. Same like how we use expandable quoted replies in discourse.

For example.


After installing the plugin, do I need to configure something in particular ? It didn’t work for me. I tried whitelist/un-whitelist facebook.com, same issue. I have nothing in the error logs. I’ll try rebuilding again tonight without the garmin_connect_onebox plugin. Maybe it’s an incompatibility with these two

(Vinoth Kannan) #9

Can you please share which url you tried to onebox?


I’ve tried a few, here some examples :




(Vinoth Kannan) #11

Above urls are working fine for me. Did you tried by disabling garmin_connect_onebox plugin?


I’ll try tonight, i’ll give you an update.

edit : after a rebuild, same issue. It’s not an issue with the garmin onebox plugin. I deactivate my other plugins in the admin panel. Deactivated the CSS too.

For the first time, I don’t understand where I messed up with a simple install. I’ll try in a few days when I’ll have the time to rebuild only with this plugin. I’ll be sure.

Anyway, it’s probably not the plugin if it works with the others. I’ll find the solution :v:

edit 2016/08/26 : I finally tried with this plugin and only this one. It didn’t work again. So it’s not a compatibility issue. I’ll check the config in the admin panel. It must come from this.


This is awesome stuff. Very useful for my use case.


Ahah, it’s weird. It works now.

I tried on another Discourse forum and it worked so it was definitively not the plugin, so I tried differents things. Rebuilding the posts didn’t work. But when I edited a character in the links (add or delete the / at the end of the link), it worked.

Thanks for this cool plugin !

(Non-technical User) #15

Was looking for this a long time. Thank you. But unfortunately for me on Digitalocean droplet the oneboxing of public facebook videos is not happening even after the plugin is installed. I do not see any errors in the logs. I have enabled facebook.com in settings > onebox too. And unable to figure out what could be the problem. Am trying this video World's smallest Linux server, with... - Interesting Engineering and also tried a few other public facebook posts like images etc.

(Vinoth Kannan) #16

I can’t understand why it’s randomly happening. @Steven also experienced this before and now it’s working for him now. I think because some onebox cache problem. I will check again in this issue. Can you please try with new urls which you never tried before?

(Non-technical User) #17

Yes Vinoth, I have tried again with new URls both vidoes and pictures but they do not seem to work. I have a feeling it has got something to do with Digital Ocean or cloudflare on top of that I am using.


A twiiter onebox would be more useful , is the facebook onebox in working state ?

(Vinoth Kannan) #19

Yes. It is working. But as per @envieme and @Steven posts I hope it is not stable. Currently I don’t have much time to work on it. I will release stable version of this plugin as soon as possible.

(EW 👌) #20

Yeah I’d tried it too. Not working for me too.
It would be nice to have it working soon!

(Vinoth Kannan) #21

Okay. let me check it again. will be back with update soon.

(Vinoth Kannan) #22

Version 0.2

Now the facebook embeds are expandable quotes by default. Embedding will display only when a user click the expand icon. It will fix the previous known issue below.

And I tested it in my local discourse and it’s working fine :slight_smile:. Can anyone please test this in a fresh discourse install (where this plugin previously not used) and tell me about the stability?