Get FB likes count for specific URL and page

不想你离开。 提交于 2019-12-18 11:58:05

问题


This is a two questions in one.

  1. Is it possible to get the likes count to a specific page inside a website? As in if there's a like button without a specific target url, likes will be given to the address in the window.location.href; can this number be retrieved without an API key?

  2. Is it possible to get the official Facebook page/page id if I only have the URL of the website? If i only have the URL / domain name (coca-cola.com), can I get the facebook page which is https://www.facebook.com/cocacola?


回答1:


You can check the like count of a website by calling the Graph like the following:

https://graph.facebook.com/?ids=http://www.your-website.com/the-url-or-so

To your Question if you can get a Facebook Page if you are the owner of the Business:

Yes! Some times ago I've read an article posted by Facebook where this is described. If you are the owner of a company/business/brand you can ask facebook for the page transfer to your account. For that you must be the owner and your business is really large. When the names of the companies are the same you must have to one which is more popular.




回答2:


Is it possible to get the likes count to a specific page inside a website?

If that page is in the Open Graph, yes.

Is it possible to get the official Facebook page/page id if I only have the URL of the website?

No, because there is no such thing. No one is obligated to have a FB fan page for their business, organization or whatever.



来源:https://stackoverflow.com/questions/10919501/get-fb-likes-count-for-specific-url-and-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!