Facebook错误100:您不能在发布的帖子上指定预定的发布时间 [英] Facebook Error 100: You cannot specify a scheduled publish time on a published post
问题描述
绝对每个问题我都提出了关于这个问题的问题,但是他们的答案都没有帮助我解决问题。
我试图在我的Facebook页面上发布。 / p>
以下是问题:
错误:
(#100)你不能在已发布的帖子上指定预定发布时间
代码:
code> FB.api(
/ 100177680105780 / feed,
POST,
{
message:这是一个测试消息,
scheduled_publish_time:Math.round(new Date()。getTime()/ 1000)+ 120
},
函数(响应){
console.log(response);
if(response&&!response.error){
/ *处理结果* /
}
});
我不知道为什么这会给我这个错误。即使我在帖子的内容中添加对象:{}也不行。我尝试更改UNIX时间戳,我尝试更改消息,我尝试设置发布:false ,没有运气。
任何指导将是惊人的。
已发布:false
以便发布预定的职位。如果您在设置此参数后仔细查看错误,它说:
(#200)未发布的帖子必须发布到页面页面本身。
只有使用页面访问令牌才能发布排程的帖子 - 足够的逻辑,因为那些拥有管理页面的权限可以安排该帖子。
此外,使用您的代码(您正在使用正常的用户访问令牌),该帖子将自己发布,而不是代表页面。这些帖子在侧栏上不在主墙上可见 - 这不是你正在寻找的? :)
所以,使用页面访问令牌。要获取页面访问令牌,首先使用 manage_pages
权限获取新用户令牌,并拨打电话 -
\GET / {page-id}?fields = access_token
使用此令牌并拨打电话来安排发布 -
FB.api(
/ {page-id } / feed,
POST,
{
message:这是一个测试消息,
scheduled_publish_time:Math.round(new Date .getTime()/ 1000)+ 120,
已发布:false,
access_token:{page-access-token}
},
函数){
console.log(response);
if(response&&!response.error){
/ *处理结果* /
}
});
我不知道您的应用程序究竟是什么,但是如果获得永不过期的页面访问令牌可帮助您在此处查看我的答案。
希望有帮助!
编辑
由于@Tobi已经提到,还要确保UNIX发布时间在10分钟到6个月之间。由于您使用的是2分钟,也可能会造成问题。
I just had to do this. Absolutely every question I looked up questions regarding this issue but none of their answers helped me solve it.
I am trying to post on my Facebook page.
Here is the issue:
Error: "(#100) You cannot specify a scheduled publish time on a published post"
Code:
FB.api(
"/100177680105780/feed",
"POST",
{
"message": "This is a test message",
"scheduled_publish_time": Math.round(new Date().getTime() / 1000) + 120
},
function (response) {
console.log(response);
if (response && !response.error) {
/* handle the result */
}
});
I have no idea why this is giving me this error. It doesn't work even if I add the "object":{} around the content of the post. I tried changing the UNIX time stamp, I tried changing the message, I tried setting "published": false and no luck.
Any guidance would be amazing.
"published": false
should be set in order to publish the scheduled posts. If you carefully see the error after you set this parameter, it says:
(#200) Unpublished posts must be posted to a page as the page itself.
The scheduled posts can be published only using the page access token - logical enough since those who have the permission to manage the pages can schedule the post.
Also, with your code (where you are using a normal user access token), the post is published as yourself not on behalf of the page. And these posts are visible on the side bar not on the main wall- that's not what you are looking for right? :)
So, use the page access token. To get the page access token, get the new user token first with manage_pages
permission and make the call-
\GET /{page-id}?fields=access_token
Use this token and make the call to schedule the post-
FB.api(
"/{page-id}/feed",
"POST",
{
"message": "This is a test message",
"scheduled_publish_time": Math.round(new Date().getTime() / 1000) + 120,
"published": false,
"access_token": "{page-access-token}"
},
function (response) {
console.log(response);
if (response && !response.error) {
/* handle the result */
}
});
I'm not sure about what exactly your application does, but if getting a never-expiring page access token helps you you can see my answer here for the same.
Hope that helps!
Edit:
As @Tobi has mentioned, also make sure UNIX timestamp is between 10 minutes and 6 months from the time of publish. Since you are using 2 minutes, that may also create problem.
这篇关于Facebook错误100:您不能在发布的帖子上指定预定的发布时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!