允许Facebook用户只投票一次

The site is a voting site for music artists. Each artist is saved in a database and they have a vote column. Each time a user clicks vote it adds one to the vote column in the database.

I want the users to log in with facebook and vote only ONCE for only ONE artist.

How would i go by doing such thing?

EDIT

This is a screen shot of the database I have. database screenshot

Not sure where exactly you got stuck, and your question is way too broad for Stackoverflow, but here's how it works:

  • Authorize users with your Facebook App.
  • Whenever a user votes, store his ID with the vote and check if he already voted for that artist. A voting table could have the following 3 columns: artistId, vote, userId - or if the voting is not a number but just a flag, you could omit the "vote" column.

Links: