I would like to integrate facebook comments on our web site (many articles, many authors). By experience, these comments have to be moderated and I would like to achieve two things:
Apply own filtering techniques to identify spam and hold back publishing.
Have granular control about who can moderate (eg. authors on comments on their own article)
Can you please advise me on how to achieve this?
My knowledge so far: if I use the comments box, everything gets submitted to Facebook directly. I would be able to access the comments via Graph API, but not to modify them programatically (eg. delete them in facebook?).
a) Is there a way to delete a comment via an API, when I have the comment id from Graph-API?
b) Alternatively, can comments be submitted indirectly (visitor enters a comment, moderator approves, comment is sent to FB)
Related
What I'm trying to do is basically described in this particular
doc page from FB itself: click (post, comment content and listen for new content), but for a "normal" closed group instead of a group in a workplace.
According to the document, this would only be possible by storing the user access token of the group admin and use various graph API endpoints, but this does not seem like a good solution to me.
Is there any other known way (something like creating a Facebook app which will create posts, comment/like stuff and listens to new posts made in the group (similar to the group bots in workplaces))?
Thank you in advance!
Luca
Is there any other known way (something like creating a Facebook app wich will create posts, comment/like stuff and listens to new posts made in the group (similar to the group bots in workplaces)) ?
No, there is not.
Reading posts and creating them using the group admin's token would be possible, but that's about it.
Liking posts in the name of users has generally been removed (not just for group posts),
commenting will likely not be possible either for any non-admin in a closed group, and
Webhooks do not cover non-workplace group feeds as of now either, so you'd have to do constant pulling to get new posts.
And yet, the Facebook API clearly states:
In groups, bots can do many of the things that people can do. This means you can build bots that post new content, comment on content with new information and like posts to indicate acknowledgment or approval.
https://developers.facebook.com/docs/workplace/integrations/custom-integrations/bots#botsingroups
I am building a social application, users post data to the website, which is saved in our database.
This creates a record on the site, which is searchable and creates the basic content and function of the site (the purpose is not relevant at this point)
When a record is saved to our database, I want to "spread the word" and send this data out to social networks. Currently, I'm looking at Facebook in isolation.
So, I know how to create a post through the Graph API and post this content to the users Timeline, or indeed to a business page associated with the APP/Website.. but I am not sure how, or if indeed one should, maintain continuity.
What I mean... if a user creates a record on my website, and then the website/App creates a post on my business page, and also asks the user to post it in their Timeline, how do I stop this being two separate posts, and instead one post which has been shared?
I want to achieve:
User posts on website
>
Website posts to Page
>
Post on Page is "Shared" to users Timeline
As opposed to:
User posts on website
>
Website posts to Page
>
Website posts an additional post to users Timeline
The reason I want to do this, is that on the website, I want to be able to show shares, likes and comments from Facebook by tracking the ID of the initial post created when first entered onto my website.
Or am I trying to reinvent the wheel and should just use Facebook's comment plugin?
When you create the post on facebook on the Page, store the returned post ID in your data model.
From what I can tell, there is no way to access the normal user share directly through the API. If you insist on doing it programmatically without popping up any dialog for your user, you can make a post to the user's page which has (the start of) the Page post and a linkback to the Page post as an attachment. This is probably to prevent abuse.
However, if you don't mind relying on an undocumented and deprecated endpoint, you can use the old sharer.php endpoint, so long as you have a fully qualified link to the post you want to share (you can retrieve the url through the api). This will also require your user to enter anything appropriate in their share and then click "share."
The endpoint is
http://www.facebook.com/sharer.php
Call it with the u parameter filled in with the url, so
http://www.facebook.com/sharer.php?u=[URL encoded URL of the post you wanted to call]
You can try this with any facebook post (go to a post, copy the url, past in as the parameter), it's still working (I just tried it) but there are no guarantees. See the top answer to Facebook API: "Share" a post already posted on a page's wall?.
You can still access likes, comments, etc for that post id through the Graph API (and you can provide your users a direct link to the post). Cache/update them as recommended and display them on your own page. You are basically mirroring back onto your own site what is happening on facebook in regards to the post you made.
I would go this route especially if you are at all planning on branching into other services. That way you can do an aggregated display of statistics/likes/etc from the multiple services you are having your platform repost to. This is also good for (at least an impression of) data integrity for your users: they know that your service represents everything they have done in case anything happens to their facebook/etc accounts.
This could especially be noteworthy if they are worried about facebook/etc deleting any of their posts, or for recovering from any issues where a post/comment/etc is not properly stored by facebook/etc (for example, comments have a maximum length which, at least via the main FB UI, silently drops anything above the maximum length in a non recoverable way for the user).
Just browsing the API and I'm a bit unclear on this. I'll need to dig more to figure it out, but I wanted to know if anyone else out there has done this. Seems like Facebook Groups mimic bulletin boards but are more robust. I'd like to at least be able to synchronize comments and import group posts perhaps under something like TOPIC >> FACEBOOK POSTS. Would be a huge win for the dying world of bulletin boards to piggyback on a Facebook sync so that people can post in the FB group and have others receive notifications while some kind of implementation of the Facebook Realtime Updates API. Imports new posts from the Facebook page so that new users or those not on Facebook can also participate in the discussion. The tough part of course would be synchronizing the respective post ID's and their comments on the forum <--> Facebook.
Has this been done, and more importantly is it allowed? Does it violate Facebook terms & conditions?
Looks like my inquiry is pretty similar to this one
Get data from a facebook page wall or group wall for use on personal website
Just in case I don't get a better answer and someone else finds this question...
I have a website that allows people to post events and it automatically posts their events to facebook if they so choose. I also integrated facebook comments on the event pages on my website.
Is it possible to merge the comments that people leave on my website's event pages with the comments that people leave on the facebook event page that was automatically made for them? I can't seem to find any documentation on this.
Edit: Just to clarify: The comments on my website are done via the facebook-comments API, they are not a module of my application.
Adding a separate answer, as after clarification it's significantly different.
If you want to basically have the wall of your event show up on your website, you can use the Event API to pull in wallposts and display them. To be able to post to that wall, you would have to do some custom coding to authenticate the user with publish_stream permission and then have a form on your site that would post to the event's wall, as noted in the post section of the above link.
Someone may have done this already and put code out there, but I doubt there is an easier way to get your ideal situation up and running. This use case isn't as automagic as the comments box, unfortunately.
If you're just looking to spread your events socially, however, the comments box will post to the commenters' walls with a link to your event page, which can then in turn point them to the Faecbook event. You might be able to use the Facebook event's URL as the URL for your comment box on the website, so it would just post a link directly to the Facebook event, but I'm not sure on that one.
I looked at this in my app, and we ended up deciding to just maintain separate streams. This is because it's only a one-way integration - you can get comments from Facebook via the Graph API and format them on your own website, in-line with your website comments, but there's no way to push comments from your website up to Facebook.
You could, if you wanted, just use the Facebook comment form for all comments - this has been done by big sites such as TechCrunch, and is effective, but it requires users to have a Facebook, AOL, Yahoo, or Hotmail account. Whether you want to do that or not depends on your preferences and userbase.
there a tool that combines comments form different pages or different sources
Check https://feedgun.com which works on pulling comments from different sources like YouTube videos, existing wordpress sites, facebook comments plugins and even DIsqus account and combine them all together and publish them on any of your webpages, and it all works automatically once you set them where to pull and where to publish.
My application has obtained publish_stream permissions for a Facebook user.
I'd like to allow the user to post comments for a target URL directly from my mobile application, rather than opening up an embedded browser that then shows the Comment Box plugin. That is, the user doesn't necessarily want to post the link to their feed -- rather they want to participate in any Facebook comment discussion that surrounds that URL.
Naturally, I can read the comments for any URL via the Graph API (eg: a techcrunch article) but I do not know how, or if I can add comments to an arbitrary URL programmatically.
Would love to hear any other suggestions or workarounds as well. My hope is to piggy back on Facebook comments to allow my users to have a conversation surrounding URLs of interest to them. If at all possible, I'd also prefer to use Facebook, though I can see using Disqus or similar services would be another possibility.
Use graph api, demo comments here
make POST to
http://graph.facebook.com/comments/?ids=http://techcrunch.com/2011/07/22/big-surprise-the-ipad-trumps-android-tablets-at-the-office/
with field message and value "yourmessage"
I genuine Facebook API bug.
Cannot comment via Graph API on Comments Plugin (Probably try Legacy API)
Graph API