开发者

Retrieve individual like counts across an entire domain

开发者 https://www.devze.com 2023-01-22 14:23 出处:网络
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

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开发者_JAVA技巧 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消