【发布时间】:2016-11-23 06:56:16
【问题描述】:
考虑调用以使用 abraham/twitteroauth PHP library 检索 Twitter 用户的收藏列表:
https://api.twitter.com/1.1/favorites/list.json
给定以下参数:
$params = array(
'screen_name' => $screenName,
'count' => $count,
'include_entities' => true,
);
虽然所有请求的推文实际上都在 Twitter 网站上显示/嵌入了照片,但 API 响应中并不总是出现在 entities 父字段中的相关 media 字段。
Here's a tweet 的响应包含该字段,another one 的响应不包含该字段。您将在此 Gist 中找到相应的 JSON 回复:https://gist.github.com/davidloubere/8331a2b523772d99c669e1e720aa4afc
有人对此有解释吗?
【问题讨论】:
-
您能否针对这两个示例给出您的查询和 Twitter API 响应?
-
确保您通过
include_entities=true -
问题已在上述 cmets 之后更新。