2

我知道你可以使用 API (https://dev.twitter.com/docs/api/1/get/users/show),但我怎样才能让它出现在我的网站上?例如,“用户名”具有“关注者数量”。

4

1 回答 1

1

干得好:

<?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;

?>
于 2012-04-09T16:55:40.760 回答