使用php访问Twitter中的GET帐户/ verify_credentials中的数据

时间:2012-09-20 20:52:53

标签: php json twitter twitter-oauth

当我在twitter API中使用该方法时

$content =  $connection->get('account/verify_credentials');

它返回一个包含用户所有数据的json

我知道我可以像这样访问屏幕名称:

$content->screen_name

但我如何访问国家和国家代码...

1 个答案:

答案 0 :(得分:0)

您可以使用location字段访问用户的位置。你必须从中猜出国家(及其代码)。

有关更多文档,请参阅相应的Twitter开发者页面:https://dev.twitter.com/docs/platform-objects/users

相关问题