微博自媒体接入平台 – 头条文章开放接口响应,代码:11002,信息:create statuses error 的排查分析

1、微博头条文章发布响应,代码:11002,信息:create statuses error,如图1

图1

2、查看请求参数:

[root@2aea756816fb runtime]# cat common-logics-http-weibo_api-Article-pulishToutiao-data-1611558219.765-1094985333.txt
Array
(
    [title] => 联播+中共中央党史和文献研究院编辑
    [content] => <div id="editWrap"><p>
    《论述摘编》分9个专题,共计285段论述,摘自习近平同志2013年3月4日至2020年11月23日期间的讲话、报告、演讲、指示、批示、贺信等一百篇重要文献。其中许多论述是第一次公开发表。
</p>
<p>
    <br/>
</p>
<p>
    党的十八大以来,以习近平同志为核心的党中央对网络强国建设高度重视。习近平总书记亲自担任中央网络安全和信息化领导小组组长、中央网络安全和信息化委员会主任,先后就网信工作召开多次重要会议,围绕网络强国建设发表一系列重要论述,提出一系列新思想新观点新论断,为新时代网信事业发展提供了根本遵循,推动我国网信事业取得历史性成就。
</p>
<p>
    <br/>
</p></div>
    [summary] =>
    [cover] => https://mserver.chinamcloud.cn/cms/base/qysj/upload/HttpImage/mrtpsc/2021/01/22/313f833b8eae4e14a763bfe742303ae5.png
    [text] => 《论述摘编》分9个专题,共计285段论述,摘自习近平同志2013年3月4日至2020年11月23日期间的讲话、报告、演讲、指示、批示、贺信等一百篇重要文献。其中许多论述是第一次公开发表。

党的十八大以来,以习近平同志为核心的党中央对网络强国建设高度重视。习近平总书记亲自担任中央网络安全和信息化领导小组组长、中央网络安全和信息化委员会主任,先后就网信工作召开多次重要会议,围绕网络强国建设发表一系列重要论述,提出一系列新思想新观点新论断,为新时代网信事业发展提供了根本遵循,推动我国网信事业取得历史性成就。
)

3、查看响应对象:

[root@2aea756816fb runtime]# cat common-logics-http-weibo_api-Article-pulishToutiao-response-1611558219.7651-1251078854.txt
yii\httpclient\Response Object
(
    [client] => yii\httpclient\Client Object
        (
            [baseUrl] => https://api.weibo.com
            [formatters] => Array
                (
                    [urlencoded] => yii\httpclient\UrlEncodedFormatter Object
                        (
                            [encodingType] => 1
                            [charset] =>
                        )

                )

            [parsers] => Array
                (
                )

            [requestConfig] => Array
                (
                )

            [responseConfig] => Array
                (
                )

            [contentLoggingMaxSize] => 2000
            [_transport:yii\httpclient\Client:private] => yii\httpclient\StreamTransport Object
                (
                    [_events:yii\base\Component:private] => Array
                        (
                        )

                    [_eventWildcards:yii\base\Component:private] => Array
                        (
                        )

                    [_behaviors:yii\base\Component:private] =>
                )

            [_events:yii\base\Component:private] => Array
                (
                )

            [_eventWildcards:yii\base\Component:private] => Array
                (
                )

            [_behaviors:yii\base\Component:private] => Array
                (
                )

        )

    [_headers:yii\httpclient\Message:private] => Array
        (
            [0] => HTTP/1.1 200 OK
            [1] => Server: WeiBo/LB
            [2] => Date: Mon, 25 Jan 2021 07:03:39 GMT
            [3] => Content-Type: application/json; charset=utf-8
            [4] => Connection: close
            [5] => Vary: Accept-Encoding
            [6] => Vary: Accept-Encoding
            [7] => X-Powered-By: PHP/7.2.1
            [8] => Cache-Control: no-cache, must-revalidate
            [9] => Expires: Sat, 26 Jul 1997 05:00:00 GMT
            [10] => Pragma: no-cache
            [11] => PROC_NODE: 93-31-164-aliyun-core.jpool.sinaimg.cn
            [12] => LB_NODE: mweibo-10-22-254-44.xxg.intra.weibo.cn
        )

    [_cookies:yii\httpclient\Message:private] =>
    [_content:yii\httpclient\Message:private] => {"code":11002,"msg":"create statuses error","data":[]}
    [_data:yii\httpclient\Message:private] =>
    [_format:yii\httpclient\Message:private] =>
    [_events:yii\base\Component:private] => Array
        (
        )

    [_eventWildcards:yii\base\Component:private] => Array
        (
        )

    [_behaviors:yii\base\Component:private] =>
)

4、查看开发文档 – 自媒体接入平台 – 头条文章开放接口。https://open.weibo.com/wiki/Toutiao/api 。错误码对应表:11002,create statuses error,微博发送失败。无借鉴意义。如图2

图2

5、登录微博后,编写头条文章,使用同样的内容。点击发布按钮后,提示:抱歉,因此内容中存在违反相关法律法规或《微博社区公约》的信息,无法进行当前的操作。(20021)。如图3

图3

6、编辑微博内容后,发布成功。删除了:习近平、习近平总书记。如图4

图4


发布失败的内容:
《论述摘编》分9个专题,共计285段论述,摘自习近平同志2013年3月4日至2020年11月23日期间的讲话、报告、演讲、指示、批示、贺信等一百篇重要文献。其中许多论述是第一次公开发表。

党的十八大以来,以习近平同志为核心的党中央对网络强国建设高度重视。习近平总书记亲自担任中央网络安全和信息化领导小组组长、中央网络安全和信息化委员会主任,先后就网信工作召开多次重要会议,围绕网络强国建设发表一系列重要论述,提出一系列新思想新观点新论断,为新时代网信事业发展提供了根本遵循,推动我国网信事业取得历史性成就。

发布成功的内容:

《论述摘编》分9个专题,共计285段论述,摘自习近平同志2013年3月4日至2020年11月23日期间的讲话、报告、演讲、指示、批示、贺信等一百篇重要文献。其中许多论述是第一次公开发表。

党的十八大以来,以同志为核心的党中央对网络强国建设高度重视。亲自担任中央网络安全和信息化领导小组组长、中央网络安全和信息化委员会主任,先后就网信工作召开多次重要会议,围绕网络强国建设发表一系列重要论述,提出一系列新思想新观点新论断,为新时代网信事业发展提供了根本遵循,推动我国网信事业取得历史性成就。

7、搜索:微博社区公约,打开链接:https://s.weibo.com/weibo/%23微博社区公约%23 。初步推测应该是与第十三条相冲突而导致发布失败。如图5

图5

8、将发布成功的内容通过开放接口调用,发布成功。仅修改了 text 的值。查看请求参数:

[root@2aea756816fb runtime]# cat common-logics-http-weibo_api-Article-pulishToutiao-data-1611627486.3737-1187930202.txt
Array
(
    [title] => 联播+中共中央党史和文献研究院编辑
    [content] => <div id="editWrap"><p>    《论述摘编》分9个专题,共计285段论述,摘自习近平同志2013年3月4日至2020年11月23日期间的讲话、报告、演讲、指示、批示、贺信等一百篇重要文献。其中许多论述是第一次公开发表。</p><p>    <br/></p><p>    党的十八大以来,以习近平同志为核心的党中央对网络强国建设高度重视。习近平总书记亲自担任中央网络安全和信息化领导小组组长、中央网络安全和信息化委员会主任,先后就网信工作召开多次重要会议,围绕网络强国建设发表一系列重要论述,提出一系列新思想新观点新论断,为新时代网信事业发展提供了根本遵循,推动我国网信事业取得历史性成就。</p><p>    <br/></p></div>
    [summary] =>
    [cover] => https://mserver.chinamcloud.cn/cms/base/qysj/upload/HttpImage/mrtpsc/2021/01/22/313f833b8eae4e14a763bfe742303ae5.png
    [text] => 《论述摘编》分9个专题,共计285段论述,摘自习近平同志2013年3月4日至2020年11月23日期间的讲话、报告、演讲、指示、批示、贺信等一百篇重要文献。其中许多论述是第一次公开发表。党的十八大以来,以同志为核心的党中央对网络强国建设高度重视。亲自担任中央网络安全和信息化领导小组组长、中央网络安全和信息化委员会主任,先后就网信工作召开多次重要会议,围绕网络强国建设发表一系列重要论述,提出一系列新思想新观点新论断,为新时代网信事业发展提供了根本遵循,推动我国网信事业取得历史性成就。
)

9、查看成功的响应对象:

[root@2aea756816fb runtime]# cat common-logics-http-weibo_api-Article-pulishToutiao-response-1611627486.3738-1563491245.txt
yii\httpclient\Response Object
(
    [client] => yii\httpclient\Client Object
        (
            [baseUrl] => https://api.weibo.com
            [formatters] => Array
                (
                    [urlencoded] => yii\httpclient\UrlEncodedFormatter Object
                        (
                            [encodingType] => 1
                            [charset] =>
                        )

                )

            [parsers] => Array
                (
                )

            [requestConfig] => Array
                (
                )

            [responseConfig] => Array
                (
                )

            [contentLoggingMaxSize] => 2000
            [_transport:yii\httpclient\Client:private] => yii\httpclient\StreamTransport Object
                (
                    [_events:yii\base\Component:private] => Array
                        (
                        )

                    [_eventWildcards:yii\base\Component:private] => Array
                        (
                        )

                    [_behaviors:yii\base\Component:private] =>
                )

            [_events:yii\base\Component:private] => Array
                (
                )

            [_eventWildcards:yii\base\Component:private] => Array
                (
                )

            [_behaviors:yii\base\Component:private] => Array
                (
                )

        )

    [_headers:yii\httpclient\Message:private] => Array
        (
            [0] => HTTP/1.1 200 OK
            [1] => Server: WeiBo/LB
            [2] => Date: Tue, 26 Jan 2021 02:18:06 GMT
            [3] => Content-Type: application/json; charset=utf-8
            [4] => Connection: close
            [5] => Vary: Accept-Encoding
            [6] => Vary: Accept-Encoding
            [7] => X-Powered-By: PHP/7.2.1
            [8] => Cache-Control: no-cache, must-revalidate
            [9] => Expires: Sat, 26 Jul 1997 05:00:00 GMT
            [10] => Pragma: no-cache
            [11] => PROC_NODE: 131-9-53-huawei-core.jpool.sinaimg.cn
            [12] => LB_NODE: mweibo-172-16-234-58.yf.intra.weibo.cn
        )

    [_cookies:yii\httpclient\Message:private] =>
    [_content:yii\httpclient\Message:private] => {"code":100000,"msg":"","data":{"object_id":"1022:2310474597561255395687","url":"http:\/\/weibo.com\/ttarticle\/p\/show?id=2310474597561255395687","mid":4597561257900066}}
    [_data:yii\httpclient\Message:private] =>
    [_format:yii\httpclient\Message:private] =>
    [_events:yii\base\Component:private] => Array
        (
        )

    [_eventWildcards:yii\base\Component:private] => Array
        (
        )

    [_behaviors:yii\base\Component:private] =>
)

 

永夜