How does the Facebook Like button work?
I believe the Like button is using cookies to obtain your FB user information, that with additional attributes are then sent to a service endpoint.
As for security measures, an obvious would be to allow requests only from websites with given access keys.