Reputation: 504
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.
Upvotes: 0
Views: 564
Reputation: 9121
You should identify the user on your site and save his liking by using a callback solution:
FB.Event.subscribe('edge.create', function(href, widget) {
// callback will be fired when some one clicked your like button
// your code to save here ...
alert('You liked ' + href, widget);
});
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
Upvotes: 1
Reputation: 38115
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.Upvotes: 1