Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fb.event.subscribe and facebook comment box

Tags:

facebook

Context:

I have a facebook app that is using the facebook comments box.

In this app a user can create an item for sale.

The item for sale is available at facebook_url_for_the_app/item/itemnumber.

When the user that created the item for sale (or any other user) visualizes the page for the created item, the facebook comments box is available.

Desired function:

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

My Idea to solve the problem:

I have looked into FB.Event.subscribe('comments.create') but there isn't a field to identify a user other than the admin of the application.

Question:

How can I tell my app to create a subscribe to any comments created at the item's page, facebook_url_for_the_app/item/itemnumber.

like image 518
Joka Avatar asked Aug 17 '11 00:08

Joka


1 Answers

Joka,

If you subscribe to comment.create event

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

You can then add code to do something with the uid returned by the FB.api call

like image 95
eosgood Avatar answered Nov 13 '22 19:11

eosgood