Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically embed newest Facebook posts on my website

Tags:

facebook

Facebook introduced embedded posts (https://developers.facebook.com/docs/plugins/embedded-posts/), but it only lets me embed a given post onto my webpage.

I would like to automatically embed the newest Facebook post from our company Facebook profile into our webpage. Is that possible?

like image 877
Pascal Klein Avatar asked Oct 13 '13 17:10

Pascal Klein


People also ask

How do I get Facebook to show recent posts on my website?

Choose the post you want to show. Click on the top right-hand corner options menu and choose “embed post” Copy and paste the code into your blog or website.

Can you embed Facebook feed on website?

To embed a Facebook Event Feed on your website, go to the Page Plugin and paste your Facebook Page URL into the box. Then, type "events" into the Tabs section. Now, click "Get Code" and copy-and-paste that code into your existing site using the steps outlined above. And there you have it!

How do I automatically post links on Facebook status updates?

Click the “Select a Blog” menu and select your website from the drop-down list. A preview is displayed showing what updates will look. The next time you add a new post to your website, it will automatically post to your Facebook Wall as a status update.


2 Answers

Is this what you're looking for?

<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2FYOUR-FB-PAGE-ID&width=600&colorscheme=light&show_faces=true&border_color&stream=true&header=true&height=435" scrolling="yes" style="border:none; overflow:hidden; width:600px; height:430px; background: white; float:left; " allowtransparency="true" frameborder="0"></iframe>

Replace YOUR-FB-PAGE-ID with the Facebook page's ID.

JSFiddle example

Source: https://www.youtube.com/watch?v=vmFShEeI5qg

like image 173
Pikamander2 Avatar answered Oct 06 '22 23:10

Pikamander2


The solution above suggested this, but you can always get a Page Access Token (you need a user access token from a user who is an admin of that page before requesting the page access token) and request access to that page's feed so that you can get the latest post ID and embed that post with the ID.

Page access tokens: https://developers.facebook.com/docs/facebook-login/access-tokens/#pagetokens

like image 37
jake2389 Avatar answered Oct 06 '22 22:10

jake2389