Quantcast
Channel: Instagram authenticaton for self feed? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Instagram authenticaton for self feed?

$
0
0

I'm trying to get photos from my Instagram-Feed but everytime Il have to login in my Authentication-Popup, although i use my access token from DB

//FIRST TIME$array = array('client_id'=>'XXX','client_secret' => 'XXX','grant_type' => 'authorization_code','redirect_uri' => REDIRECT_URL,'code' => $_GET['code']        );    curl_setopt($ch,CURLOPT_URL, $url);    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);    curl_setopt($ch,CURLOPT_POSTFIELDS, $array);    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);     $res = curl_exec($ch);    $access_token = $res['access_token'];    //SAVE ACCESS_TOKEN INTO DB     //NEXT TIME    $url = 'https://api.instagram.com/v1/users/self/feed?access_token='.$db['access_token'].'&client_id='.$array['client_id'].'&client_secret='.$array['client_secret'];    $ch = curl_init();    curl_setopt($ch,CURLOPT_URL, $url);    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);    curl_setopt($ch, CURLOPT_HTTPGET, 1);     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);     $res = curl_exec($ch);

What am I doing wrong?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images