问题
I have a friend who wants to run a weekly contest where users can vote on their favorite pictures. He wants users to "Like" a photo in order to vote for it. Is this a reasonable mechanism for this action? Will this work? Is there a reasonable way to get the vote numbers out of facebook?
Facebook indicates that the Like number on a button is the sum of:
* The number of likes of this URL
* The number of shares of this URL (this includes copy/pasting a link back to Facebook)
* The number of likes and comments on stories on Facebook about this URL
* The number of inbox messages containing this URL as an attachment.
I'd want to make sure that people would only be able to vote once, and not message the URL to a lot of friends in order to gain votes.
What are the downsides and/or implications of building it this way versus building a more traditional polling system?
Thanks!
回答1:
UPDATE:
Based on the new Promotions Guidelines, you cannot use the Like plugin as a voting mechanism:
You must not use Facebook features or functionality, such as the Like button, as a voting mechanism for a promotion.
Actually using Facebook as a Voting-System won't be a bad idea at all, I'm thinking of implementing a test voting-system myself (based on Facebook Like PLugin..etc).
The approach would be similar to the answer here.
You capture the "likes" and "dislikes":
FB.Event.subscribe('edge.create', function(response) {
$.ajax({
type: 'POST',
url:'/voting.php',
data: {vote: 'up'}
});
});
FB.Event.subscribe('edge.remove', function(response) {
$.ajax({
type: 'POST',
url:'/voting.php',
data: {vote: 'down'}
});
});
You set the correct Open Graph Meta Tags:
<meta property="og:title" content="Picture Title" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://domain.com/path/to/picture/page/" />
<meta property="og:image" content="http://domain.com/path/to/picture.jpg" />
<meta property="og:site_name" content="Site Name" />
<meta property="fb:admins" content="XXXXXXX" />
<meta property="fb:app_id" content="XXXXXXX" />
So now you can do one of two things:
- Have a record in YOUR DB that you increment the likes (or decrement when a user change his mind and dislike) based on the JS events
- You may use FQL (link_stat table to be more specific) to collect the
total_count
for a certain URL (object) and check for the most liked.
So depending on your needs if you only want to collect votes (likes) from within your page use the FB.events
above or the FQL otherwise.
回答2:
I don't believe Facebook offers any method of mutually-exclusive 'likes,' so it seems easy for a user to 'like' both (or all) options in the poll, which would skew the results somewhat. Plus I'm not sure how reliable a system it would be to, conflate the discussion about a product ("The number of likes and comments on stories on Facebook about this URL" and "The number of inbox messages containing this URL as an attachment") as an actual endorsement of a product.
Personally, I use Facebook messaging, as well as my email, to share horror-stories of vendors and adverts almost as much as I share the positive experiences with the same.
This seems, to me, to be a very bad choice. If Facebook is to be used, why not simply create a poll thereon?
- Create an opinion poll on Facebook,
- Facebook Polls blog.
来源:https://stackoverflow.com/questions/5240760/voting-for-items-via-facebook-like