php代码
<?php
function get_CURL($url)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
curl_close($curl);
return json_decode($result, true);
}
$result = get_CURL('https://api.instagram.com/v1/users/self?access_token=XXXXXX.XX.XXXXb9344ace8f0953e8b');
$usernameIG = $result['data']['username'];
$profilePictureIG = $result['data']['profile_picture'];
$followersIG = $result['data']['counts']['followed_by'];
?>
html
<img src="<?= $profilePictureIG; ?>" width="100" class="rounded-circle img-thumbnail">