我想从facebook的特定页面获取所有帖子 这就是我创造这个的原因 https://developers.facebook.com/tools/explorer?method=GET&path=1mpics%2Fposts
并给出答案
{
"data": [
{
"message": "AWESOME BONSAI TREES",
"story": "1,000,000 Pictures added 8 new photos.",
"created_time": "2015-07-09T10:07:08+0000",
"id": "237513286345629_976999625730321"
},
{
"message": "Animals that Could Teach Us a Thing or Two About Humanity",
"story": "1,000,000 Pictures added 7 new photos.",
"created_time": "2015-07-09T09:05:50+0000",
"id": "237513286345629_976979942398956"
},
{
"message": "Photo of Shakira & pique family that will make your heart melt",
"story": "1,000,000 Pictures added 7 new photos.",
"created_time": "2015-07-09T08:09:55+0000",
"id": "237513286345629_976966809066936"
},
{
"message": "Most amazing modified tree",
"story": "1,000,000 Pictures added 9 new photos.",
"created_time": "2015-07-09T07:02:33+0000",
"id": "237513286345629_976952932401657"
},
{
"message": "Scotland",
"story": "1,000,000 Pictures added 7 new photos.",
"created_time": "2015-07-09T06:07:08+0000",
"id": "237513286345629_976940065736277"
},
{
"message": "Most Amazing Miniature Food Artworks by Shay Aaron",
"story": "1,000,000 Pictures added 15 new photos.",
"created_time": "2015-07-09T05:16:45+0000",
"id": "237513286345629_976926542404296"
},
{
"message": "Preacher’s Pulpit Rock – Preikestolen is One of the Most Visited Natural Tourist Attractions in Norway",
"story": "1,000,000 Pictures added 8 new photos.",
"created_time": "2015-07-09T04:08:01+0000",
"id": "237513286345629_976904609073156"
},
{
"message": "Chow Chow Puppies ^_^",
"story": "1,000,000 Pictures added 7 new photos.",
"created_time": "2015-07-09T03:06:09+0000",
"id": "237513286345629_976889169074700"
},
{
"message": "Amazing Bouquets",
"story": "1,000,000 Pictures added 11 new photos.",
"created_time": "2015-07-09T02:12:29+0000",
"id": "237513286345629_976873619076255"
},
{
"message": "Can You Answer This Correctly ?
25% of people can't solve ....",
"created_time": "2015-07-09T01:03:17+0000",
"id": "237513286345629_976840855746198"
},
{
"message": "Setenil de las Bodegas is a town in the province of Cádiz, Spain, famous for its dwellings built into rock overhangs above the Rio Trejo",
"story": "1,000,000 Pictures added 8 new photos.",
"created_time": "2015-07-09T00:05:20+0000",
"id": "237513286345629_976822569081360"
},
{
"message": "summer goals 2k15 :D",
"story": "1,000,000 Pictures added 4 new photos.",
"created_time": "2015-07-08T23:09:58+0000",
"id": "237513286345629_976801202416830"
},
{
"message": "The Colorful Pheasant Dorado Originally from China, Burma and some other parts of Asia <3 :)",
"story": "1,000,000 Pictures added 7 new photos.",
"created_time": "2015-07-08T22:00:46+0000",
"id": "237513286345629_976730642423886"
},
{
"message": "Painted Upside-Down To Reflect Off Of The Water by New York-based....Cool Idea!",
"created_time": "2015-07-08T21:19:53+0000",
"id": "237513286345629_976712795759004"
},
{
"message": "A Badly Injured Baby Squirrel Gets Adopted By family in Finland :) <3",
"story": "1,000,000 Pictures added 16 new photos.",
"created_time": "2015-07-08T20:15:47+0000",
"id": "237513286345629_976693149094302"
},
{
"message": "The Biggest Guard Dogs In The World! WOW",
"created_time": "2015-07-08T18:59:08+0000",
"id": "237513286345629_976667212430229"
},
{
"message": "grapes <3",
"story": "1,000,000 Pictures added 6 new photos.",
"created_time": "2015-07-08T18:04:12+0000",
"id": "237513286345629_976653262431624"
},
{
"message": "This Woman Took A Photo Of Her Family And Realized One Of The Children Wasn't Hers...",
"created_time": "2015-07-08T17:02:05+0000",
"id": "237513286345629_976632639100353"
},
{
"message": "The wonder of nature: Giant Leatherback Sea Turtle <3",
"story": "1,000,000 Pictures added 5 new photos.",
"created_time": "2015-07-08T16:01:43+0000",
"id": "237513286345629_976604169103200"
},
{
"message": "Creative Family Pic Ideas <3",
"story": "1,000,000 Pictures added 6 new photos.",
"created_time": "2015-07-08T15:01:15+0000",
"id": "237513286345629_976579499105667"
},
{
"message": "21 Teen Selfies That Will Make You Not Want To Live On This Planet Anymore",
"created_time": "2015-07-08T14:11:03+0000",
"id": "237513286345629_976559942440956"
},
{
"story": "1,000,000 Pictures added 10 new photos.",
"created_time": "2015-07-08T13:22:17+0000",
"id": "237513286345629_976540349109582"
},
{
"message": "Santorini, Greece",
"story": "1,000,000 Pictures added 6 new photos.",
"created_time": "2015-07-08T12:12:47+0000",
"id": "237513286345629_976514799112137"
},
{
"message": "Hilarious Tattoo Fails That Will Make You Cringe and Laugh At The Same Time",
"created_time": "2015-07-08T11:10:04+0000",
"id": "237513286345629_976497505780533"
},
{
"message": "These babies anywhere in any position and can sleep",
"story": "1,000,000 Pictures added 9 new photos.",
"created_time": "2015-07-08T10:05:44+0000",
"id": "237513286345629_976477272449223"
}
],
"paging": {
"previous": "https://graph.facebook.com/237513286345629/posts?since=1436436428&limit=25&__paging_token=enc_AdC1DfaVhTJ6EzPKyRsiPgyRTq2gZBP8DyJPNkUwcDrLJZC9vrwXEBxeZBqZB3X9UNwFEfCeIJqaA7ZBKyVmg87UGrSozzFySNCSWec93iilK5aVYUAZDZD&__previous=1",
"next": "https://graph.facebook.com/237513286345629/posts?limit=25&until=1436349944&__paging_token=enc_AdAc1NAFnua2XsKoLVATNHLKZBI1NaWCplzbvQJkf6xWAmxtcGppMGlJCPUQclS1WCTseB9FKFH1oSykhSEV4y0ulfexIMBkIaOrpnTYu7H4EnwZDZD"
}
}
但它只给了25个帖子。 我想得到所有的帖子如何得到所有的帖子??
答案 0 :(得分:2)
您需要实现分页才能获得接下来的25个条目:https://developers.facebook.com/docs/graph-api/using-graph-api/v2.4#paging
...或者你可以使用limit参数,最大值为100:
/page-id/posts?limit=100