【发布时间】:2018-11-08 07:42:43
【问题描述】:
我在 mgp25 Instagram API 中遇到错误。当我在本地主机上运行应用程序时,没有问题,但是当我到达付费主机时,我收到以下错误。:
InstagramAPI\Response\TimelineFeedResponse: Consent required
我已经正常工作了 1-2 天,但我注意到它无法正常工作。这个问题怎么解决,是代理的问题吗?
【问题讨论】:
我在 mgp25 Instagram API 中遇到错误。当我在本地主机上运行应用程序时,没有问题,但是当我到达付费主机时,我收到以下错误。:
InstagramAPI\Response\TimelineFeedResponse: Consent required
我已经正常工作了 1-2 天,但我注意到它无法正常工作。这个问题怎么解决,是代理的问题吗?
【问题讨论】:
此例外与 GDPR 同意有关。您的主机 IP 是否来自欧盟?
GPDR 同意请求如下所示:
public function sample()
{
return $this->ig->request('consent/existing_user_flow/')
->addPost('_uuid', $this->ig->uuid)
->addPost('_uid', $this->ig->account_id)
->addPost('_csrftoken', $this->ig->client->getToken())
->addPost('current_screen_key', 'tos_and_two_age_button')
->addPost('updates', json_encode(['age_consent_state' => 2, 'tos_data_policy_consent_state' => 2]))
->getResponse(new Response\GenericResponse());
}
您可以在此处获取更多信息:https://github.com/mgp25/Instagram-API/pull/2047
【讨论】: