You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error "Missing 'media_id_string'" is misleading when the actual issue is unrelated to media upload, such as an expired user token. Update error handling to display specific API error messages or fallback to the generic message:
The error "Missing 'media_id_string'" is misleading when the actual issue is unrelated to media upload, such as an expired user token. Update error handling to display specific API error messages or fallback to the generic message:
private function uploadMediaChunked(string $path, array $parameters)
{
/** @var object $init */
$init = $this->http(
'POST',
self::UPLOAD_HOST,
$path,
$this->mediaInitParameters($parameters),
['jsonPayload' => false],
);
if (!property_exists($init, 'media_id_string')) {
throw new TwitterOAuthException($init->errors[0]->message ?? 'Missing "media_id_string"');
}
.....
The text was updated successfully, but these errors were encountered: