如何在我的WordPress网站上显示Instagram追随者计数器?

如何在我的WordPress网站上显示Instagram追随者计数器?,wordpress,instagram,counter,Wordpress,Instagram,Counter,如何在我的WordPress网站中显示Instagram追随者计数器请参见屏幕截图 您能检查一下下面的代码吗 $api_key = 'API_KEY'; $user_id = 'UID'; $data = @file_get_contents("https://api.instagram.com/v1/users/$user_id/?client_id=$api_key"); $data = json_decode($data, true); echo '<pre/>'; print

如何在我的WordPress网站中显示Instagram追随者计数器请参见屏幕截图

您能检查一下下面的代码吗

$api_key = 'API_KEY';
$user_id = 'UID';
$data = @file_get_contents("https://api.instagram.com/v1/users/$user_id/?client_id=$api_key");
$data = json_decode($data, true);
echo '<pre/>';
print_r($data);
echo $data['data']['counts']['followed_by'];
$api_key='api_key';
$user_id='UID';
$data=@file\u get\u内容(“https://api.instagram.com/v1/users/$user\u id/?client\u id=$api\u key”);
$data=json_decode($data,true);
回声';
打印(数据);
echo$data['data']['counts']['后接'u';

谢谢,我认为API_密钥替换为客户端Id,UID替换为客户端机密,对吗?我的答案是mark as correct?有人能帮上忙吗