简体   繁体   中英

how to post follow/unfollow with instagram api - php

i want to post follow / unfollow with instagram api

i just dont understand where use to ACTION enter image description here

i use this function to curl and see result:

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

I think curl_setopt($cu, CURLOPT_POSTFIELDS, 'action=follow'); should do the trick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM