After sharing or like a page on Facebook I want to add userpoints in Drupal 7, how can I do this?

  • You can do this with Rules if you can somehow make sharing or liking a page on Facebook an event within the Drupal system. May 28 '13 at 6:08

First, you need to have your users login to your site using Facebook API. There are many modules for it, two I know and seen used are:

That's the only real way to know "he" on Facebook is "he" on your site.

Then, Facebook will not push it's data to you. So you have 2 cases:

  • Button "like this page on Facebook" on your page - you can detect it being clicked and make a rule for it, as Patrick Kenny told in his comment.
  • Like clicked directly on Facebook - now that's hard. It was discussed on stackoverflow with some apparently good results, and there are tutorials avaliable.

Last but not least - you need to make sure you grant this bonus only once. If not, users could fabricate points by simply repeatedly liking-unliking your page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.