2
我知道你可以使用API(https://dev.twitter.com/docs/api/1/get/users/show),但是我怎样才能让它出现在我的网站上呢?例如。 '用户名'具有'追随者计数'。显示Twitter关注者网站上的计数?
我知道你可以使用API(https://dev.twitter.com/docs/api/1/get/users/show),但是我怎样才能让它出现在我的网站上呢?例如。 '用户名'具有'追随者计数'。显示Twitter关注者网站上的计数?
在这里你去:
<?php
$url = "http://api.twitter.com/1/users/show.json?screen_name=jjmpsp&include_entities=true";
$feed = file_get_contents($url);
$twitter_decoded = json_decode($feed);
echo $twitter_decoded->followers_count;
?>