Trigger a function immeditely after a user posted a comment

How can i immidiately know if a user has posted a comment?

There is a hook called “wp_insert_comment“, that is executed right after the comment is added. This actions passes 2 arguements first the comment id and the second is the comment.

How can i know which user is that?

Well it depends on if the user is a registered subsriber of your blog.
Use the hook “wp_insert_comment” in conjunction with the function “get_comment“.

How can i trigger a function after that?

It’s just php so you can do whatever you want in your function.

This is just a help to solve your problem by your own. The hardest part will be to work on with the Facebook API.