简体   繁体   English

跟踪Android应用程序的邀请数量

[英]Track number of invites for android app

I have a client/server application. 我有一个客户端/服务器应用程序。
It's an android app backed by php/MySQL server. 这是一个由php / MySQL服务器支持的Android应用程序。

I need the user to be able to invite people to download the app 我需要用户能够邀请人们下载应用程序
by sharing the download link, something like http://domain.com/invite.php?userid=12345 通过共享下载链接,例如http://domain.com/invite.php?userid=12345
and track the number of people that have clicked on the link (on the server). 并跟踪点击链接(在服务器上)的人数。

I could increment that number every time the link is clicked 每次点击链接时我都可以增加该数字
but, obviously, the problem is that the user could click on its own link 但是,显然,问题是用户可以点击自己的链接
and increase his/her score. 并提高他/她的分数。

What is the best way to avoid cheating the invites system? 避免欺骗邀请系统的最佳方法是什么?

To me, these functionnalities are to be implemented on the server-side. 对我来说,这些功能将在服务器端实现。 Try to add another tag to your question. 尝试在您的问题中添加其他标记。 For example, you could have the possibility to create a UID for your user, and one for his phone, and then deny every request from his phone when attempting to hit his own link. 例如,你可以为你的用户创建一个UID,为他的手机创建一个UID,然后在尝试点击他自己的链接时拒绝来自他手机的每个请求。 Just an idea. 只是一个想法。

The most painless way would be to use cookies to track a re-visit, and possibly validate the User-Agent. 最无痛的方法是使用cookie来跟踪重新访问,并可能验证用户代理。 It's fairly easy to fake headers though, so it's not the most secure approach. 虽然伪造标题很容易,但这不是最安全的方法。

Alternatively, have a validation page - eg the link you share goes to a page requesting either an email address or phone number, then you email or SMS the real link to the new user. 或者,有一个验证页面 - 例如,您共享的链接会转到请求电子邮件地址或电话号码的页面,然后您通过电子邮件或短信发送给新用户的真实链接。 This way, you can filter out duplicates fairly easily, at the cost of privacy issues. 这样,您可以相当轻松地过滤掉重复项,但代价是隐私问题。

There are lots of SMS gateway providers out there, and message costs are fairly low, although you need a paid app for this approach to make sense. 有许多短信网关提供商,消息成本相当低,尽管你需要一个付费应用程序才能使这种方法有意义。

Hope this helps, 希望这可以帮助,

Phil Lello Phil Lello

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM