Facebook申请邀请奖励

发布于 2024-12-02 22:11:55 字数 404 浏览 1 评论 0原文

我正在尝试制作一款允许用户邀请朋友的 Facebook 游戏。我想提供一种激励措施,邀请其他人的人每被邀请者获得 10 点积分,即可获得 1 点奖励积分。 我正在使用 Python 运行时在 Google App Engine 上开发 facebook 应用程序。

实现这种功能的最佳方法是什么?我知道我可以找出谁邀请了特定的应用程序用户。我想要考虑到很多用户并希望节省尽可能多的服务器资源。

我正在考虑创建一个“用户”实体,其中有一个“id”值、一个“点”值和一个“引用来源”值。当为用户添加积分时,服务器会查找“引用来源”实体并相应地奖励积分。但由于我每 10 只奖励 1 点,服务器每次检查点 mod 10 是否为 0 可能会很浪费。而且,如果邀请点被带入,似乎整个用户数据存储命名空间都会不断地传播点,这也是浪费。

有什么好的实现方法吗?

I'm trying to make a facebook game that allows users to invite friends. I'd like to provide an incentive that people who invite others get 1 bonus point for every 10 points that their invitee gets.
I'm developing the facebook app on Google App Engine using the Python runtime.

What is the best way to implement this kind of feature? I know that I can find out who invited a given app user. I want to account for a lot of users and want to conserve as many server resources as possible.

I was thinking to create a 'User' entity, where there is a 'id' value, a 'points' value and a 'referred from' value. When points are added to for a user, the server looks up the 'referred from' entity and awards points accordingly. But since I am only awarding 1 point for every 10, it might be a waste for the server to check every time whether points mod 10 is 0. Also, if invitation points are carried through, it seems like the entire User datastore namespace would constantly be propagating points, which is also wasteful.

Any good way to implement?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

自演自醉 2024-12-09 22:11:55

正如您所观察到的,实现此目的的一种方法是每次用户总共获得 10 分时更新父实体。如果他们一次只赚取一分,则最大开销为 10%。

更有效的选择可能是在用户赚取积分时设置一个标志,然后每天运行一次 MapReduce 或其他类似作业,汇总设置了该标志的用户推荐的所有积分,并将其添加到总积分中。

One way to do this, as you observe, is to update the parent entity every time the user earns a total of 10 points. If they only earn one point at a time, the maximum overhead for this is 10%.

A more efficient option might be to set a flag whenever a user earns points, and once a day, run a mapreduce or other similar job that sums up all the points for a user's referrals who have that flag set and adds it to their total.

柏拉图鍀咏恒 2024-12-09 22:11:55

这违反了 faecbooks 平台政策

应用程序不会直接奖励或要求用户使用 Facebook Social
渠道,例如摘要故事和请求。

This is against faecbooks platform policy

App does not directly reward or require users to use Facebook Social
channels, such as Feed stories and Requests.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文