FQL query to fetch all data of a facebook page

一世执手 提交于 2019-12-13 07:35:31

问题


I want to fetch all the accessible data of a facebook page (Only page table data is enough for me now). I only have the page url of that page. After observing some urls i found that the url's can be in the following 2 formats.

  • http://www.facebook.com/username
  • http://www.facebook.com/pages/name/page_id

Now what i am doing is querying in facebook page table by username(for 1st type of url's) or page_id(for 2nd one's).

Here are the questions..

  • Am i doing anything wrong?
  • Anyone have any better sugestion? actually i am searching for a generation solution of this problem.
  • I also want to get the page visits count. Can you please give me some idea of how can i find the visits count?

Thank you very much for your time.


回答1:


For the columns to query from page see: http://developers.facebook.com/docs/reference/fql/page/

the FQL will look like for by ID:

SELECT {columns} FROM page WHERE page_id=PAGEID

and for by page name:

SELECT {columns} FROM page WHERE username='PAGEUSERNAME'

Happy coding!



来源:https://stackoverflow.com/questions/9110420/fql-query-to-fetch-all-data-of-a-facebook-page

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