Facebook 错误 100:您无法在已发布的帖子上指定预定的发布时间 [英] Facebook Error 100: You cannot specify a scheduled publish time on a published post

查看:21
本文介绍了Facebook 错误 100:您无法在已发布的帖子上指定预定的发布时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是不得不这样做.绝对每个问题我都查过关于这个问题的问题,但他们的回答都没有帮助我解决这个问题.

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.

我正在尝试在我的 Facebook 页面上发帖.

I am trying to post on my Facebook page.

问题来了:

错误:(#100)您不能在发布的帖子上指定预定的发布时间"

代码:

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 */
        }
    });

我不知道为什么这会给我这个错误.即使我在帖子内容周围添加对象":{},它也不起作用.我尝试更改 UNIX 时间戳,尝试更改消息,尝试设置 "published": false,但没有成功.

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.

任何指导都会很棒.

推荐答案

"published": false 应该设置为发布预定的帖子.如果你在设置这个参数后仔细看到错误,它说:

"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) 未发布的帖子必须作为页面本身发布到页面上.

(#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? :)

因此,请使用页面访问令牌.要获取页面访问令牌,首先使用 manage_pages 权限获取新的用户令牌并进行调用 -

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.

希望有帮助!

正如@Tobi 所提到的,还要确保 UNIX 时间戳在发布之日起 10 分钟到 6 个月之间.由于您使用的是 2 分钟,这也可能会产生问题.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆