dongyu9894 2012-04-02 10:25
浏览 10
已采纳

PHP,Facebook就像按钮用户验证一样

Is there a way to check weather a user actually clicked the like button of my website or not?

I want to give a credit to the user who clicks like button.

If it is not possible to get facebook user IDs of the fan page, I can only think that just storing a data when they click the like button script.

  • 写回答

1条回答 默认 最新

  • douyingbei1458 2012-04-02 10:54
    关注

    You can only know whether user has liked your fan page or not, by using a facebook app in fan page.

    But, you cannot get an FB id on a website by this approach.

    But yes, you can know when user has liked the page. If you are using your own login system and someone likes your webpage. You can actually save that user's value in database.

    Subscribe to like button. Whenever a user clicks on like button, it will call a javascript function. You can call a server side page via ajax call from that function , that server side page can update current user as liker of webpage.

    Refer this on how to subscribe like button:

    http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?