Embed a Facebook Page Post including Comments - javascript

I've been looking at how to embed a Facebook Page Post using this documentation. I like the way this looks, but it doesn't allow for the comments to also be shown at the same time. My goal is to create a dashboard of page post and display it on a TV in the hallway. None of the posts have more than 10 comments so it wouldn't get out of hand. Is there a way to accomplis this using the api I linked, or do I need to spin up my own iframe to include the comments?

It appears the best way to list the comments of a Facebook page post is to use the Facebook Graph API. Here is a direct link to the comments API:
https://developers.facebook.com/docs/graph-api/reference/v2.5/object/comments

Related

Getting latest facebook post via oembed read feature

Recently I've been working on a website that has synchronized news with its Facebook page equivalent.
The main idea is to display on website 3 latest post from owner's facebook page.
So far I've applied for an App Review to use function oEmbed Read and the permission has been granted.
I've been using Facebook's graph API with success but I need to specify a proper URL link to specific post.
What I would like is to skip the part where I need to provide an endpoint so it will be automatized. Both for posts as well as for videos.
Endly, the code will be run from JS component that is applied on the website.
Do you have any ideas how to solve this?

Embed Dynamic Instagram Feed Into HTML With Code Only (NO API/Plugin)

I am looking to get started on how to embed an entire dynamic Instagram feed using HTML and JavaScript (if possible/if necessary) instead of using API's and plugins.
Essentially, what I want on a page for a website that I am currently working on is to show all of the posts as part of a feed on a website and whenever a new post is uploaded on Instagram, that newest post to load automatically.
Does anyone know how to do this or how I can get started on this please?
A little late to reply, but hopefully this is helpful for someone...
Firstly, so we're on the same page, you WILL need to use at least one API to do this-- the Instagram API. You need to use the Instagram API in order to fetch content from their service (this article explains the basic idea https://www.freecodecamp.org/news/what-is-an-api-in-english-please-b880a3214a82/)
Now, you do not say whether you've looked at the Instagram developer docs, but this would be a great place to start: https://developers.facebook.com/docs/instagram
It looks like they have some example code and tutorials, so hopefully there is enough info here to get you started! Based on your question, it sounds like you may want to first check out their BasicDisplayAPI: https://developers.facebook.com/docs/instagram-basic-display-api
Finally, you might find this other SO post helpful. Unfortunately the blog link is broken, but the code snippet looks promising
Embed an instagram feed
This blog article looks promising as well:
https://dev.to/ljcdev/embedding-an-instagram-post-in-your-website-3666

Embed full comments from Facebook post

I want to embed a whole list of comments from a Facebook post into web page. I googled around but found that Facebook only supports embedding "single" comment.
For example, I create a post in my Facebook post and my friends comment on the posts. Now I want to embed all my friends' comments into my blog, without the post content.
Is this currently officially supported by Facebook? Or is there any 3rd party library can help to render the comments following Facebook UI style?
Thanks in advance.
Take a look at "Comment Mirroring" with the Comments Plugin in the docs: https://developers.facebook.com/docs/plugins/comments
It may be what you need, but afaik it only works with Pages.
You could also use the graph api to read the comments, but that would only work one way (from the page to your website). Check out the API reference for more information about that: https://developers.facebook.com/docs/graph-api/reference/v2.7/comment/
Edit: Comment Mirroring is deprecated now: https://developers.facebook.com/blog/post/2017/11/07/changes-developer-offerings/

Facebook: Posting multiple links using graph API (javascript sdk)

My requirement is in such a way that when the user clicks on the button, content similar as below has to be posted on the user's wall from our site.
Sample Sharing Content
I like the following pages in xyz.com
1. link 1
2. link 2
3. link 3
4. link 4
Is this achievable through facebook graph API[javascript sdk]? If so how can it be done?
EDIT
Currently I am able to do the above but I wanna share a link with a clickable text and url. For example instead of displaying http://www.google.com, I want to display Google as the url text.
Instead of having this http://www.google.com, I wanna do this Google
Can that be done? Is it possible through API?
Yes, it is possible. You first have to register an app on Facebook. Then you create a login for the user with the right permissions. And finally, you make an Api call to publish your content to their wall.
Registering app & login: http://developers.facebook.com/docs/howtos/login/getting-started/
Api call: http://developers.facebook.com/docs/reference/javascript/FB.api/
Let me know if you have any questions..
I think you want something like collections. Take a look at this example image.
This cannot be done in an quick way. You need to fiddle around with the open graph and its actions. This might be a lot to do at first, but the results are very nice (as the different screenshots/app examples demonstrate). The docs are quite good on the basics and there are plenty of ressources on how to archive advaned stuff. But the basics should be enough for a simple link list. Note that this is not just result in "regular" wall post but a collection of links in the users profile, that can also appear on his wall.
You cannot just use "vanilla HTML" to post these collections of link like you want to since it is neither supported, proposes good security not UX compatible.

how to retrieve facebook page wall posts update in external site

I need to publish landing tab wall posts of a page on my website using php and javascript,can anybody tell me how to implement this ,as i thought it can be done with FQL via page table but there is no any related field i found.
thanks
Use the Graph API to retrieve posts for a page: https://graph.facebook.com/SmartDeals/posts
You can use either PHP and JavaScript to parse that JSON and display whatever you'd like.
The complete list of things you can retrieve for your page is documented under the Connections section at: http://developers.facebook.com/docs/reference/api/page

Categories