Like / Dislike Button
You might be able to customize the excellent tutorial on the use of Ajax for Like and Dislike using voting API by Amitav Roy. His primary purpose is to show the reader how to use AJAX, but the code is solid and seems to suit your purpose.