Код: Выделить всё
AQVDf5VKdYJGIBL9... (token works for other endpoints too)
< /code>
[list]
[*] конечная точка API называется < /li>
< /ul>
$accessToken = '...'; // valid token
$organizationId = 'urn:li:organization:organizationid';
$encodedOrgId = urlencode($organizationId);
$url = "https://api.linkedin.com/v2/ugcPosts?q=authors&authors=List($encodedOrgId)";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer $accessToken",
"X-Restli-Protocol-Version: 2.0.0"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
API показывает Total: 449 посты.
[*] , но элементы Array - это всегда пустоте пусто.
Код: Выделить всё
r_organization_social[*]
Код: Выделить всё
rw_organization_admin< /code> < /p>
< /li>
< /ul>
Вещи, которые я проверил: < /p>
Токен доступа. [b] Super Admin [/b] из организации.
[*] Токен имеет правильные аспекты. X-restli-protocol-версия: 2.0.0 [/list]
- Почему Ugcposts показывает общее количество, но нет элементов?
Подробнее здесь: https://stackoverflow.com/questions/795 ... al-count-0
Мобильная версия