Fb.event.subscribe and facebook comment field

Context:

I have a facebook application that uses the facebook comment box.

In this application, the user can create an item for sale.

Product for sale is available on facebook_url_for_the_app/item/itemnumber .

When the user who created the item for sale (or any other user) renders a page for the created item, a facebook comment window is available.

Function Required:

Currently, if a user writes a comment, the user who created it will only know about it if he visits the page.

My idea for solving the problem:

I looked at FB.Event.subscribe('comments.create') , but there is no field for identifying a user other than the application administrator.

Question:

How can I tell my application to create a subscription to any comments created on the item page, facebook_url_for_the_app/item/itemnumber .

+6
source share
3 answers

Joka

If you are subscribed to the comment.create event

 <script> FB.Event.subscribe('comment.create', function(resp) { Log.info('Comment was added', resp); // add code here to id the user eg FB.api('/me', function(response) {}) }); </script> 

Then you can add code to do something with the uid returned by the FB.api call

+2
source

Joka: I guess this link will help you in some way. Here you can subscribe to an event and use it to notify the user.

click here to view page

0
source

You can also make them a moderator of the comment window by adding a meta tag

 <meta property="fb:admins" content="{THEIR_FACEBOOK_USER_ID}"/> 

to the head.

0
source

Source: https://habr.com/ru/post/895207/


All Articles