【发布时间】:2021-07-20 03:36:29
【问题描述】:
例如,我可以使用下面的代码获取“文本”,但如何在包含 > 用户下获取用户名“Lionek_Gaming”?
$tweets = json_decode($response);
foreach($tweets->data as $tweet) {
$text = $tweet->text;
echo $text;
}
Json 响应
{
"data": [
{
"author_id": "1169144412171055104",
"id": "1386731275160072192",
"text": "sell Bitcoin at sweet rates"
}
],
"includes": {
"users": [
{
"id": "1304731585112158209",
"name": "Lionek_official #BRG",
"username": "Lionek_Gaming"
}
]
},
}
【问题讨论】:
-
可能使用authorId查询姓名