Facebook的按钮用于Facebook页面上的特定标签和网址 [英] Facebook Like Button for Specific Tab and Url in Facebook Page

查看:77
本文介绍了Facebook的按钮用于Facebook页面上的特定标签和网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Facebook页面中为我的App Tab添加一个Facebook Like按钮。例如:

I'm trying to include a Facebook Like button for my App Tab in a Facebook Page. For example:

http://www.facebook.com/pages/PageName/PageId?v=app_AppId&app_data=article-1
http://www.facebook.com/pages/ pageName / PageId?v = app_AppId& app_data = article-2
http://www.facebook.com/pages/PageName/PageId?v=app_AppId&app_data=article-3

我' d喜欢所有3个URL拥有自己的喜欢按钮。不幸的是,对于类似按钮的iframe和fbml vesions,似乎Facebook将类似按钮视为整体页面按钮。即如果用户已经喜欢了该页面,那么他们就会喜欢上面的所有3个链接。

I'd like all 3 of the URLs to have their own "Like" buttons. Unfortunately, for both the iframe and fbml vesions of the like button, it seems like Facebook treats the like button as an overall Page like button. i.e. if a user has "liked" the Page, then they would have liked all 3 links above.

有没有办法将这些喜欢的hrefs视为唯一的?

Is there a way to treat these "like" hrefs as unique?

谢谢

推荐答案

您可以传递与当前不同的网址页面作为Like按钮的href参数。我解决这个问题的方法是将内容提供给独立的网址,而不需要使用JavaScript重定向到Facebook页面标签的查询字符串(http://example.com/article/3)。

You can pass a different URL than the current page as the href parameter of the Like button. The way I solved it is by having the content available on a stand alone URL, without query strings (http://example.com/article/3) which redirects to the Facebook page tab using JavaScript.

当用户喜欢内容时,Facebook刮板打到独立页面,由于它不遵循JavaScript重定向,因此它正确地拾取了Open Graph标签,并计算了喜欢分别为每篇文章。

When the user "likes" the content, the Facebook scraper hits the stand alone page, and since it doesn't follow the JavaScript redirect, it picks up the Open Graph tags correctly, and counts the likes for each article separately.

这篇关于Facebook的按钮用于Facebook页面上的特定标签和网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆