code4romania / reusable-components

Repository for React reusable components
https://reusable-components-peach.vercel.app
Mozilla Public License 2.0
4 stars 10 forks source link

Correct embed for facebook links #87

Closed RaduCStefanescu closed 3 years ago

RaduCStefanescu commented 3 years ago

When embedding a facebook post, we need to make sure that the embed is correctly displayed in the newsfeed item.

dapetcu21 commented 3 years ago

So, I researched this a bit and there's no code changes needed. It just needs to be done the right way and Facebook's documentation doesn't make this easy.

Here are the steps:

  1. Go to https://developer.facebook.com and make an App ID for Rezultate Vot
  2. Go to https://developers.facebook.com/docs/plugins/embedded-posts/ and paste your post's URL in that box
  3. Press "Get Code", then Press "IFrame" from the top of the window.
  4. Select your App ID.
  5. Copy that code and, within it, change two things: Screenshot 2020-11-10 at 16 01 36

The first occurence of the width (from the iframe's URL) should be changed to auto and the second occurence (from the iframe's width attribute) should be changed to 100%.

RaduCStefanescu commented 3 years ago

@overeha please have a look above, this is what needs to be done on all embeds for facebook links