Communicating with facebook

I would like to know something like that:
If there is a movie based website where user can watch movies, when the user will click on a movie and plays it, it will share the video in facebook or post in his facebook profile “XX Watched …”

Anyone can help?