好的,我在浏览对象时遇到问题,这很容易做到:
echo $user["ratelimit"]->rate_limit_context->access_token;
但我无法做到以下几点:
echo $user["ratelimit"]->resources->lists->/lists/subscribers->limit;
以下是整个事情:
$twitteroauth = new TwitterOAuth($script["twitterck"], $script["twittercs"], $_SESSION['oauth_token'], $_SESSION['oauth_token_secret']);
$user["ratelimit"] = $twitteroauth->get('application/rate_limit_status',array('resources' => 'account,application,blocks,direct_messages,favorites,followers,friends,friendships,geo,help,lists,saved_searches,search,statuses,trends,users'));
echo $user["ratelimit"]->resources->lists->/lists/subscribers->limit;
die();
这是一个示例回复:
object(stdClass)#5(2){
["rate_limit_context"]=>object(stdClass)#6(1){
["access_token"]=>string(50)"311338379-795FzNCmmdre5VYjB066uPqXmT5jEwuC3DYoAGp8"
}["resources"]=>object(stdClass)#7(16){
["lists"]=>object(stdClass)#8(10){
["/lists/subscribers"]=>object(stdClass)#9(3){
["limit"]=>int(180)["remaining"]=>int(180)["reset"]=>int(1378607278)
}["/lists/memberships"]=>object(stdClass)#10(3){
["limit"]=>int(15)["remaining"]=>int(15)["reset"]=>int(1378607278)
}["/lists/list"]=>object(stdClass)#11(3){
["limit"]=>int(15)["remaining"]=>int(15)["reset"]=>int(1378607278)
}["/lists/ownerships"]=>object(stdClass)#12(3){
["limit"]=>int(15)["remaining"]=>int(15)["reset"]=>int(1378607278)
}["/lists/subscriptions"]=>object(stdClass)#13(3){
["limit"]=>int(15)["remaining"]=>int(15)["reset"]=>int(1378607278)
}["/lists/members"]=>object(stdClass)#14(3){
["limit"]=>int(180)["remaining"]=>int(180)["reset"]=>int(1378607278)
}["/lists/subscribers/show"]=>object(stdClass)#15(3){
["limit"]=>int(15)["remaining"]=>int(15)["reset"]=>int(1378607278)
}["/lists/statuses"]=>object(stdClass)#16(3){
["limit"]=>int(180)["remaining"]=>int(180)["reset"]=>int(1378607278)
}["/lists/show"]=>object(stdClass)#17(3){
["limit"]=>int(15)["remaining"]=>int(15)["reset"]=>int(1378607278)
}["/lists/members/show"]=>object(stdClass)#18(3){
["limit"]=>int(15)["remaining"]=>int(15)["reset"]=>int(1378607278)
}
}
}
}
非常感谢任何帮助,谢谢。