LinkedIn API UGC post 成功但未显示?

LinkedIn API UGC post success but not showing?

我相信我已成功 post 将新的 post 连接到端点

 https://api.linkedin.com/v2/ugcPosts

使用(类似于)

{
    "author": "urn:li:organization:1234567",
    "lifecycleState": "PUBLISHED",
    "specificContent": {
        "com.linkedin.ugc.ShareContent": {            
            "shareCommentary": {
                "attributes": [],
                "text": "Some share text"
            }
        }
    },
    "visibility": {
        "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
    }
}

我得到的回复是

 {"id":"urn:li:share:01234567890123456789"}

但是当我进入公司页面时,post 是不可见的。请注意,此处对 ID 进行了编辑。我还需要采取其他步骤吗?

编辑:我用端点https://api.linkedin.com/v2/ugcPosts/[redacted URN]?viewContext=AUTHOR去验证post,我的post是成功的

{
  "lifecycleState": "PUBLISHED",
  "specificContent": {
    "com.linkedin.ugc.ShareContent": {
      "shareCommentary": {
        "inferredLocale": "en_US",
        "attributes": [],
        "text": "Test article sharing article on LinkedIn API , please ignore"
      },
      "media": [
        {
          "media": "urn:li:digitalmediaAsset:XXXXXXXXXXXXXX",
          "title": {
            "attributes": [],
            "text": "image"
          },
          "thumbnails": [],
          "status": "READY"
        }
      ],
      "shareFeatures": {
        "hashtags": []
      },
      "shareMediaCategory": "IMAGE"
    }
  },
  "visibility": {
    "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
  },
  "created": {
    "actor": "urn:li:person:XXXXXXXXXXXXXX",
    "time": 1649285262053
  },
  "author": "urn:li:organization:XXXXXXXXXXXXXX",
  "clientApplication": "urn:li:developerApplication:XXXXXXXXXXXXXX",
  "versionTag": "0",
  "id": "urn:li:share:XXXXXXXXXXXXXX",
  "firstPublishedAt": 1649285262053,
  "lastModified": {
    "actor": "urn:li:csUser:7",
    "time": 1649285262122
  },
  "distribution": {
    "externalDistributionChannels": [],
    "distributedViaFollowFeed": true,
    "feedDistribution": "MAIN_FEED"
  },
  "contentCertificationRecord": "{\"spamRestriction\":{\"classifications\":[],\"contentQualityClassifications\":[],\"systemName\":\"MACHINE_SYNC\",\"lowQuality\":false,\"contentClassificationTrackingId\":\"073BB82AD64A7608E3F142B6D0362E3D\",\"contentRelevanceClassifications\":[],\"spam\":false},\"originCountryCode\":\"ca\",\"modifiedAt\":1649285262024,\"contentHash\":{\"extractedContentMd5Hash\":\"0725A7E31B109EB4CFB84D2648CE3EC8\",\"lastModifiedAt\":1649285262023}}"
}

我在这里错过了什么??为什么它现在显示在 LinkedIn 上??

edit2 : 继续尝试再次分享 post,现在所有的 post 在以管理员身份查看时都从公司页面上消失了,但显示(API posts 除外)作为成员....这 API 有多糟糕??????

我会自己回答post。使用 CurlFile 上传 不起作用 ,您必须使用 Guzzle...一旦上传和发布完成,提要将自行恢复。如果端点是公司页面将被破坏post.

仍在等待上传
    $client = new \GuzzleHttp\Client();
    $res = $client->request('PUT', $__url, [
            'headers' => [
                'Authorization' => 'Bearer ' . $__token
            ],
            'body' => fopen($__file, 'r')       
        ]
    );        
    if($res){        
        $res = json_decode($res->getBody());            
    }