php - Twitter API:被阻止在 PHP 中检索用户信息?
问题描述
我正在尝试检索 Twitter 用户信息,但我不知道为什么我被阻止,而它正在为关注者信息工作:
// Retrieve followers list with array :
$follows = $oTwitter->get("followers/ids.json?screen_name=fifa&cursor=".$cursor);
$foll_array = (array)$follows;
foreach ($foll_array['ids'] as $key => $val) {
echo $val;
}
// Whereas it is nok for list of attributes (meaning not array) :
$oUser = $oTwitter->get("users/show.json?user_id=4366881");
var_dump(get_object_vars($oUser);
=> I get the following error :
array(1) { ["errors"]=> array(1) { [0]=> object(stdClass)#12 (2) { ["code"]=> int(50) ["message"]=> string(15) "未找到用户。" } } }
知道有什么问题吗?
谢谢 !
解决方案
推荐阅读
- python - 如何使用网状将python的转换字符串代码传递给R
- android - 无法在启用 AMD Ryzen 2600、SMV、Hyper-v 和 windows hyperv 平台的情况下启动 android 模拟器
- swift - 字符串到 Double 和前导空格
- c# - “IEnumerable<>”不包含“”的定义,找不到接受“IEnumerable<>”类型的第一个参数的扩展方法“”
- scala - 递归地遍历嵌套的 Map[String, Any]
- python - Django 如何在我的表单类中获取当前用户
- node.js - 使用 lerna 在各种包上运行 mocha
- automated-tests - 如何使用 Newman 和 GitLab CI 组织您的 Postman 集合并执行它们?
- c# - 鼠标悬停时更改控件背景
- filesystems - 在 C/C++ 中在运行时确定文件系统