欢迎页面上的 Facebook Like 按钮单击事件应打开页面选项卡的弹出窗口
我想在我的 facebook 的 facebook 页面中捕获 Like 按钮单击事件。
http://www.facebook.com/wineselectors
如果有人点击“赞”按钮,它应该打开一个页面选项卡的弹出窗口 http://www.facebook.com/wineselectors?sk=app_190348341034091
我曾经使用下面的代码来捕获“赞”点击,但是它不工作。
<html> <script type="text/javascript">
FB.Event.subscribe('edge.create', function(response) {
alert('the user likes a page');
});
</script> <body> <center> <img src="http://www.wineselectors.com.au/images/UserUploadedImages/facebook-like--image.jpg" /> </center> </body> </html>
我正在尝试为欢迎选项卡开发一个 aspx 页面,但是如何在我的 aspx 页面中获取signed_request以及如何解码signed_request。我读过一些他们使用 Jason 的文章,但我无法在我的系统中使用 Jason。
I want to capture Like button click event in facebook page in my facebook.
http://www.facebook.com/wineselectors
If anyone click on like button, it should open a popup window of page tab http://www.facebook.com/wineselectors?sk=app_190348341034091
I have used to below code to capture like click, but it is not working.
<html> <script type="text/javascript">
FB.Event.subscribe('edge.create', function(response) {
alert('the user likes a page');
});
</script> <body> <center> <img src="http://www.wineselectors.com.au/images/UserUploadedImages/facebook-like--image.jpg" /> </center> </body> </html>
I am trying to develop an aspx page for welcome tab but how can I get signed_request in my aspx page and how to decode the signed_request. I have read some of the articles they were using Jason but i could not able to use Jason in my system.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当有人喜欢您的页面时,页面会完全刷新,您需要解码并检查 signed_request< /a> 服务器代码(不是 JavaScript)中的 HTTP POST 参数,以查看他们是否喜欢您的页面。然后,您可以根据需要重定向用户。
When someone likes your page, the page gets completely refreshed and you would need to decode and inspect the signed_request HTTP POST parameter in server code (not javascript) to see if they like your page. Then from there you could redirect the user as necessary.