eng*_*nws 1 php facebook-graph-api
我目前能够使用这种类型的请求(使用PHP)获取FB页面提要:
https://graph.facebook.com/{$id}/feed?{$authentication}&limit={$maximum}
Run Code Online (Sandbox Code Playgroud)
它给了我FB页面的最后帖子,包含消息和发布日期.我只想检索此内容+每个帖子图片(如果至少有一个).
所以我做了这个请求:
https://graph.facebook.com/{$feed}/feed?{$authentication}&fields=attachments&limit={$maximum}
Run Code Online (Sandbox Code Playgroud)
哪个检索内容(文本)+图片.但那里没有约会......
检索包含内容文本,图像和发布日期的页面Feed的最佳方法是什么?
created_time除了文本内容(message)和任何内容之外,还包括用于获取帖子时间戳的字段attachments:
示例通用请求:
https://graph.facebook.com/(api_version)/(page_id)?fields=feed{created_time,attachments,message}&access_token=(token_id)
Run Code Online (Sandbox Code Playgroud)
输出中的示例时间戳:
"created_time": "2016-03-17T11:33:59+0000"
Run Code Online (Sandbox Code Playgroud)