如何 post follow/unfollow 与 instagram api - php

how to post follow/unfollow with instagram api - php

我想 post 使用 Instagram 关注/取消关注 api

我只是不明白在哪里使用 ACTION enter image description here

我使用这个函数卷曲并查看结果:

function Execute_insta($url,$parametr=null)
{
    $cu = curl_init($url);
    if($parametr) {

        curl_setopt($cu,CURLOPT_POST,true);
        curl_setopt($cu,CURLOPT_POSTFIELDS,$parametr);
    }
    curl_setopt($cu,CURLOPT_RETURNTRANSFER,true);
    curl_setopt($cu,CURLOPT_SSL_VERIFYPEER,false);
    $insta = curl_exec($cu);
    $insta = json_decode($insta,true);
    return $insta;

}

instagram api url

我认为 curl_setopt($cu, CURLOPT_POSTFIELDS, 'action=follow'); 应该可以解决问题。