[Instagram] fix: add ds_user_id (#2881)

Fix #2876
This commit is contained in:
Tokariew 2022-07-07 12:08:21 +02:00 committed by GitHub
parent d107f8ed30
commit ea45717a28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View file

@ -14,6 +14,9 @@ class InstagramBridge extends BridgeAbstract
'cache_timeout' => [
'required' => false,
],
'ds_user_id' => [
'required' => false,
],
];
const PARAMETERS = [
@ -82,8 +85,9 @@ class InstagramBridge extends BridgeAbstract
{
$headers = [];
$sessionId = $this->getOption('session_id');
if ($sessionId) {
$headers[] = 'cookie: sessionid=' . $sessionId;
$dsUserId = $this->getOption('ds_user_id');
if ($sessionId and $dsUserId) {
$headers[] = 'cookie: sessionid=' . $sessionId . '; ds_user_id=' . $dsUserId;
}
return getContents($uri, $headers);
}