I'm recreating Yik Yak mobile application as a web application in process of learning Meteor framework. But that app is completely anonymous without user accounts, but still you can upvote or downvote post only once. How to make this work ?
Asked
Active
Viewed 920 times
2
-
There's no way to achieve this in an anonymous context. – Filburt Mar 03 '15 at 14:26
1 Answers
2
What you want will probably require more than just JavaScript, and some back-end code (with the language of your choice).
If it's a website, you can try to identify a user by the IP/MAC address of his/her computer. But the problem is that it is not going to be reliable (e.g.: users could hide behind fake addresses, or multiple users could use the same IP). You can read about some methods on this question (PHP).
If it's a mobile application, use the unique device ID (but again, that will require more than plain JavaScript).
- On Android:
Settings.Secure#ANDROID_ID
(read more on this question) - On iPhone:
[UIDevice currentDevice] uniqueIdentifier
(read more on this question) - On Windows Phone:
DeviceExtendedProperties.GetValue("DeviceUniqueId")
(read more on this question) - If you are using Cordova/PhoneGap to create a web app, you can use the
device.uuid
to get a unique identifier (read more here)
With the unique device ID (UDID), you can identify what device voted, without knowing who is the owner of that device and without forcing your users to create an account/log in.

Community
- 1
- 1

Alvaro Montoro
- 28,081
- 7
- 57
- 86
-
Thank you Alvaro Montoro, great answer ! Going to use unique device ID – mhlavacka Mar 04 '15 at 21:53