检索整个域中的个人点赞计数

发布于 2024-09-29 23:56:33 字数 500 浏览 4 评论 0 原文

我的域名是: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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

离线来电— 2024-10-06 23:56:33

很可能你可以。 (一开始我很确定,现在我在底部添加了 * 编辑 * 注释)

为此,您将需要使用 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:app_id" content="YOUR FACEBOOK APPLICATION ID" />

meta property= "fb:page_id" content="您想要添加的其他粉丝专页 ID" />

您肯定需要添加 fb:app_id 标签。

如果您使用 FQL 调用(它的表示法很像 Mysql),则在将适当的 ID 添加到您的部分后,大致涉及以下步骤:

  1. 您应该首先通过转到“域”来获取与您的域关联的 Facebook ID FQL 文档中的页面
  2. 查看并实施 FQL 指标 查询‘domain’-metrics 指标

编辑:重新考虑后:您只需要找到一种方法来获取域中任何网址的唯一 object_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:app_id" content="YOUR FACEBOOK APPLICATION 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:

  1. You should start by getting your Facebook ID associated with your domain by going to 'domain' page in the FQL documentation
  2. Check out and implement the FQL metrics queries for 'domain'-metrics

metrics"

edit: After reconsidering: You just need to find a way how to get the unique object_id of any url in your domain to query to amount of likes of that url.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文