marceloduende
marceloduende

Reputation: 719

Getting "like" data from an URL which has a facebook ID

I am having trouble to retrieve the likes or shares from this url:

http://marceloduende.com/facebook_test/

I have tried this with the following ways:

https://graph.facebook.com/?ids=http://marceloduende.com/facebook_test

and

http://graph.facebook.com/fql?q=select%20url%2C%20id%2C%20type%2C%20site%20from%20object_url%20where%20url%20%3D%20%22http%3A%2F%2Fmarceloduende.com/facebook_test%2F%22

Both of 'em are coming empty to me, without any data except my ID.

I don't know if there is any trick on my facebook app that I should have checked or something on the HTML source code that I could have missed (on the headers or something). I would appreciate any help on this.

*Edit: I can get the data, but for some reason, it returns only the shares, not the likes, even when I have the like button on my page. Any advice on why I get this limited data?

Thank you

Upvotes: 0

Views: 321

Answers (1)

cpilko
cpilko

Reputation: 11852

If you populate the og:url metadata, Facebook treats that as the cannonical URL. So your data should be available at http://marceloduende.com/facebook_test/index.html.

Check out the debugger for your page. It tells you most of the data you need to know. You also need to fix the og:type tag to a valid one

Upvotes: 2

Related Questions