-
-
Save asterion/ae139a3404cfa658755fac26f5f210b7 to your computer and use it in GitHub Desktop.
ropuesta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function add_instagram_profile(){ | |
$filename = sprintf('/tmp/profile.clapesuc.%s.json', date('Ymd')); | |
if (file_exists($filename)) { | |
$json = json_decode(file_get_contents($filename)); | |
} else { | |
$url = 'https://api.instagram.com/v1/users/'.$this->instagram_uid.'?access_token='.$this->instagram_token; | |
$text = file_get_contents($url); | |
$json = json_decode($text); | |
file_put_contents($filename, $text); | |
} | |
//$json = json_decode(array()); | |
return($json->data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment