Question: I am using Facebook Graph API to crawl information from public page. The current problem is how to get the total number of posts on a Facebook page. If we go to /{page-id}/posts, it will only return 25 posts posted on this page, and no summary information mentioned the page's fields. I have check the previous answer, it seems that the only way is to count the number of items of each link in next and get total number. But it is very inefficient. Is there any method that can directly get the total post on a page other than FQL?

Answer: 
You can only retrieve a summary/count for published posts on a page. Something like this will work when querying the Page directly:

```
{PAGE}?fields=published_posts.limit(1).summary(total_count).since(1)

```

The response will look something like:

```
{
    published_posts: {
        summary: {
            total_count: 12345
        },
        ...
    }
}

```

or if you want to query the `published_posts` directly, use:

```
{PAGE}/published_posts?limit=1&summary=total_count&since=1

```

The response will look something like:

```
{
    summary: {
        total_count: 12345
    },
    ...
}

```

Setting `limit` to 1 ensures that your query is not unnecessarily large. If you're just needing the total post count, then set `limit` to 1.

The `since` parameter is a unix timestamp (milliseconds since January 1, 1970) and is required to retrieve the total post count. Set this to 1 as setting it to 0 will throw an error.

More details: <https://developers.facebook.com/docs/graph-api/reference/page/published_posts/>
You can try adding `/page/posts?limit=1000` but I'm not sure that will work. You can also try using `/page/feed` to see if it obtains your desired results. If neither of these things work, then it is most likely that you can not retrieve the total number of posts. Also, FQL will be deprecated next year.