Upvote Downvote互动,无需登录 [英] Upvote Downvote interaction without login

查看:38
本文介绍了Upvote Downvote互动,无需登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显示用户提供的数据的FML,TWI等应用程序具有对我同意",我不同意",喜欢",不喜欢"等提交内容进行投票的能力.

Apps such as FML, TWI etc that display user supplied data have the ability to upvote and downvote submissions such as "I agree", "I disagree", "like", "dislike".

无论用户是否以任何方式登录到应用程序,他们都可以投票.匿名用户可以投票,并存储他们对该帖子/条目的投票.

Users are able to vote regardless if they are logged into the app in any means. Anonymous users can vote and it stores their vote for that post/entry.

当公共用户投票时,我对增加服务器数据库上的上下投票没有问题,但是这些应用程序如何在其应用程序内跟踪用户的投票,从而使他们无法继续为该应用程序一次又一次地投票相同的项目,如果再次进入该提交项目,还可以直观地显示出他们以哪种投票方式?

I have no problem with incrementing the up or down votes on my server database when a public user votes but how do these applications keep track of a user's votes within their app so that they can not keep giving upvotes again and again for the same item and can also visually show which way they voted if they go into that submission again?

我不会在服务器上存储用户已投票的项目以及投票的方向,因为这些项目尚未注册/登录.

I won't be storing on my server which items a user has voted on and which direction the vote was as these are not registered/logged in users.

有什么主意我可以实现吗?

Any idea how I can implement this?

谢谢

推荐答案

每个项目都必须具有某种ID,对吗?将其连同他们的投票一起保存在您的应用中.如果您的商店中存在ID,则不允许他们投票;如果ID不存在,则允许他们投票.

Each item must have some sort of ID right? Save that in your app along with their vote. If the ID exists in your store, don't allow them to vote, if it doesn't exists, allow them to vote.

这篇关于Upvote Downvote互动,无需登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆