Facebook 图 api 至 post 未来日期
Facebook graph api to post feed on future date
如何 post 使用图表 API 在未来日期创建新提要。如果我在 published 中添加日期,它的抛出错误为“with message: (#100) Param published must be a boolean”
if ( $session ) { try {
$request = new FacebookRequest(
$session,
'POST',
'/me/feed',
array (
'message' => 'Hi friends .... ',
'published' => "26/07/2015",
)
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
echo "<pre>"; print_r($graphObject); echo "</pre>";
} catch(FacebookRequestException $e) {
// echo "Exception occured, code: " . $e->getCode();
echo " with message: " . $e->getMessage();
}
}
嗯,published
字段是一个布尔值,所以它只能是 true
或 false
。
顺便说一句,只有 Pages 可以安排帖子,/me/feed
没有 published
参数:https://developers.facebook.com/docs/graph-api/reference/v2.4/user/feed#publish
对于主页,您可以将 published
设置为 true 并在 scheduled_publish_time
字段中使用日期:https://developers.facebook.com/docs/graph-api/reference/v2.4/page/feed#publish
如何 post 使用图表 API 在未来日期创建新提要。如果我在 published 中添加日期,它的抛出错误为“with message: (#100) Param published must be a boolean”
if ( $session ) { try {
$request = new FacebookRequest(
$session,
'POST',
'/me/feed',
array (
'message' => 'Hi friends .... ',
'published' => "26/07/2015",
)
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
echo "<pre>"; print_r($graphObject); echo "</pre>";
} catch(FacebookRequestException $e) {
// echo "Exception occured, code: " . $e->getCode();
echo " with message: " . $e->getMessage();
}
}
嗯,published
字段是一个布尔值,所以它只能是 true
或 false
。
顺便说一句,只有 Pages 可以安排帖子,/me/feed
没有 published
参数:https://developers.facebook.com/docs/graph-api/reference/v2.4/user/feed#publish
对于主页,您可以将 published
设置为 true 并在 scheduled_publish_time
字段中使用日期:https://developers.facebook.com/docs/graph-api/reference/v2.4/page/feed#publish