我正在尝试在我的网站中构建一个功能,我将奖励“喜欢”网站上的页面/帖子/项目的用户。我知道使用 FQL 我可以查询 like 表并找出谁喜欢它。另外,我可能需要订阅 edge.create event 才能知道当有人“喜欢”它时。
然而我的问题是这样的。我的网站上没有 Facebook 连接,因此我不知道网站用户的 Facebook UID。现在,由于没有任何共同点,我将如何将点击“赞”的 Facebook 用户与我的本地网站用户进行比较?或者我需要强制通过 FB connect 登录吗?欢迎任何解决方案(干净的或肮脏的)。
I am trying to build a function in my site where I'll reward the users who 'Like' a page/post/item on site. I know using FQL I can query the like table and find out who liked it. Also I probably need to subscribe to edge.create event to know when someone 'Like' it.
However my question is this. I don't have Facebook connect on my site so I don't know the facebook UID of my site users. Now how I'll compare the Facebook user who click on like with my local site user since there is nothing in common? Or do I need to make login via FB connect mandatory? Any solutions (neat or dirty) are welcome.
发布评论
评论(2)
我想您链接到 Like FQL 表这一事实意味着你对整件事有点困惑。
这里有几点:
link_stat
;正如您所看到的,其中没有“uid
”,edge 捕获类似内容。创建
,通过 ajax 运行奖励例程,并且由于您已经登录了本地站点用户,因此您可以对其进行检查。I guess that the fact that you linked to the Like FQL table this means that you are a bit confused about the whole thing.
Here's a couple of points:
link_stat
; and as you can see there's no "uid
" in itedge.create
, run the reward routine through ajax and since you already have the local site user logged in you can check against that.您应该识别网站上的用户并使用回调解决方案保存他的喜好:
在此处查找有关事件订阅的更多信息:http://developers.facebook.com/docs/reference/api/event/
在这里找到大量示例:http://fbrell.com/xfbml/fb:like
You should identify the user on your site and save his liking by using a callback solution:
Find more info aboeut event subscriptions here: http://developers.facebook.com/docs/reference/api/event/
Find lots of samples here: http://fbrell.com/xfbml/fb:like