fb.event.subscribe and facebook comment box
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开发者_StackOverflow 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
.
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
Joka: I guess this link will help you out in some way. Here u can subscribe for the event and use it accordingly to notify the user.
click here to view the page
You may want to also make them a moderator of the comment box by adding the metatag
<meta property="fb:admins" content="{THEIR_FACEBOOK_USER_ID}"/>
to the head.
精彩评论