我的域名是:http://rentmaps.com
有代表公寓的单独页面,例如:
http://rentmaps.com/address/31/35-Conwell-Ave, -Somerville-MA-02144
我在每个单独的页面上放置了“赞”按钮,允许用户喜欢任何相关的房屋。我希望能够查询 Graph API 以获取我域内页面的点赞数。例如,我想要:
网站上前 10 个页面的列表,根据 facebook 上的点赞数降序排列。
这可能吗?我已通过 Facebook 注册了我的应用程序,并且有一个应用程序 ID,但我无法确定我注册的应用程序与我域内各个页面上的“点赞”按钮之间是否存在任何关联。
My domain is: http://rentmaps.com
There are individual pages that represent apartments, such as this:
http://rentmaps.com/address/31/35-Conwell-Ave,-Somerville-MA-02144
I have put Like buttons on each of the individual pages, allowing users to like any of the associated houses. I would like to be able to query the Graph API to pull down likes for pages within my domain. For instance, I would like to have:
A listing of the top 10 pages across the site, ordered descending based upon the number of likes on facebook.
Is this possible? I have registered my application through Facebook and I have an app id, but I can't figure out if there is any connection between my registered application and the like button on the individual pages within my domain.
发布评论
评论(1)
很可能你可以。 (一开始我很确定,现在我在底部添加了 * 编辑 * 注释)
为此,您将需要使用 Facebook Insights。 FB Insights 是 Facebook 的统计服务,为您提供应用程序、页面和域的“见解”。
您可以通过 Facebook.com/insights 上的 Facebook Insights 或通过 Facebook Insights API 调用查看“点赞”数据。就您而言,由于您想在自己的域上显示它,因此您需要设置 Facebook API 交互。
Facebook Insights API 调用可以通过特定的 Graph API 调用来完成,也可以通过发出特定的 FQL 请求来完成。
为了能够执行 FQL 或 Facebook API 调用,您需要注册一个 Facebook 应用程序,以便秘密/密钥,以便您可以拨打电话。
此外,您需要将 OpenGraph 标签添加到您的网站,以便 Facebook 可以将您识别为该域的合法所有者。
通常,您可以将这些类型的所有者 ID 添加到您网站的部分:
<
meta property= "fb:page_id" content="您想要添加的其他粉丝专页 ID" />
您肯定需要添加 fb:app_id 标签。
如果您使用 FQL 调用(它的表示法很像 Mysql),则在将适当的 ID 添加到您的部分后,大致涉及以下步骤:
”
Most probably you can. (At first I was sure, now I added an * edit * note at the bottom)
You will need to use Facebook Insights for that. FB Insights is Facebook's stats service, giving you 'insights' in your Apps, Pages and Domains.
You can either view the 'Likes' data via Facebook Insights on Facebook.com/insights or thru the Facebook Insights API-calls. In your case, since you want to show it on your own domain, you will need to setup a Facebook API interaction.
The Facebook Insights API-calls can either be done over a certain Graph API call or by means of issueing a certain FQL-request
In order to be able to execute FQL or Facebook API calls, you need to have a Facebook Application registered, for a secret/key, so you can make calls.
Furthermore you need to add the OpenGraph tags to your site so Facebook can identify you as the rightfull owner of the domain.
Typically you can add these kind of owner ids to your site's section:
<meta property="fb:admins" content="YOUR DEVELOPER's PERSONAL ID" />
<meta property="fb:page_id" content="An additional fanpage's ID you want to add" />
You will definitely need to add the fb:app_id tag.
If you use the FQL calls (it's notation is a lot like Mysql) these are roughly the steps involved after you have added the appropriate IDs to your section:
metrics"