简体   繁体   English

Facebook API不返回所有带有访问令牌的公共页面墙贴

[英]Facebook API Not returning all of a public pages wall posts with access token

I am using the PHP Facebook API but it doesn't return all of the wall posts from my public page with a valid access token - and I can't figure out what's so special about those posts. 我正在使用PHP Facebook API,但它不会使用有效的访问令牌返回公共页面上的所有墙贴-并且我无法弄清楚这些贴有什么特别之处。 They were all made by me, the page owner - Any ideas? 它们都是由我(网页所有者)制作的-有什么想法吗?

FYI the posts that arent working contain: https://www.facebook.com/events/205819312854732/ https://www.facebook.com/events/207820205995213/ 仅供参考,Arent工作的帖子包含: https : //www.facebook.com/events/205819312854732/ https://www.facebook.com/events/207820205995213/

PHP is: $wall = $validFacebookObject->api('/184196778359304/feed?access_token=".$validToken','GET'); PHP是:$ wall = $ validFacebookObject-> api('/ 184196778359304 / feed?access_token =“。$ validToken','GET');

You can't get ALL posts in one call. 您无法在一个通话中获得所有帖子。 If you look at the bottom of the response you'll see: 如果您查看响应的底部,则会看到:

"paging": {
    "previous": "https://graph.facebook.com/184196778359304/feed?format=json&limit=25&since=1334425968&__previous=1",
    "next": "https://graph.facebook.com/184196778359304/feed?format=json&limit=25&until=1331389779"
  }

You can either use the "next" and "previous" URL's to parse through the posts, or include "limit" and "offset" parameters in your calls (ie: graph.facebook.com/PAGE_ID/feed?limit=100&offset=500&access_token=ACCESS_TOKEN will get posts 501 to 600) 您可以使用“下一个”和“上一个” URL来解析帖子,也可以在调用中包括“限制”和“偏移”参数(例如:graph.facebook.com/PAGE_ID/feed?limit=100&offset=500&access_token = ACCESS_TOKEN将获得501至600的帖子)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 网站如何通过Facebook API在其不拥有的其他页面上发布公共消息(时间线/墙贴)? - How can a site post public messages (timeline/wall posts) on other Pages it does not own via the Facebook API? Facebook PHP API代码无法与“页面”一起使用以获取Wall帖子 - Facebook PHP API code not working with “Pages” to get Wall posts 在页面墙上获取其他帖子(Facebook API) - Get posts by other on page wall (Facebook API) 通过 PHP 检索我的 Facebook 粉丝页面墙贴现在会给出“请求此资源需要访问令牌”。 - Retrieving my Facebook fan page wall posts via PHP now gives “An access token is required to request this resource.” 在Google+ API上搜索公共帖子和页面 - Search google+ api for public posts and pages Facebook Graph API返回不同页面的不同访问令牌 - Facebook Graph API returning different pages for different access tokens 如何使用带有访问令牌和curl的php api发布到Facebook用户墙? - How to post to a facebook users wall using the php api with the access token and curl? 如何访问用户在Facebook应用中发布的留言墙 - How do I access wall posts made by the user in a facebook app Facebook API 访问令牌 - Facebook API Access token 检索所有 Facebook Opened Group 墙贴、PHP 代码 - Retrieve all Facebook Opened Group wall posts, PHP code
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM