FQL query to fetch all data of a facebook page

2019-09-01 00:30发布

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.

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条回答
冷血范
2楼-- · 2019-09-01 01:04

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!

查看更多
登录 后发表回答