admin管理员组文章数量:1391956
If I just do a simple twitter API request for the following tweet, it should have multiple images attached to it, but it returns nothing in the media entity object
This is the request I am doing: .1/statuses/show/780281505826299904.json
And here's my entities object:
{
:hashtags=>[{:text=>"rescue", :indices=>[17, 24]}, {:text=>"SAR", :indices=>[110, 114]}],
:symbols=>[],
:user_mentions=>[
{:screen_name=>"Ravensoars", :name=>"Jim", :id=>2568464354, :id_str=>"2568464354", :indices=>[38, 49]},
{:screen_name=>"CoquitlamSAR", :name=>"Coquitlam SAR", :id=>203212566, :id_str=>"203212566", :indices=>[54, 67]}
],
:urls=>[{:url=>"SHORTENED_URL", :expanded_url=>"", :display_url=>"twitter/i/web/status/7…", :indices=>[116, 139]}]
}
No images, or even a media key, despite there being several when you view the tweet directly.
Any way to get those images?
If I just do a simple twitter API request for the following tweet, it should have multiple images attached to it, but it returns nothing in the media entity object
https://twitter./taloncopters/status/780281505826299904
This is the request I am doing: https://api.twitter./1.1/statuses/show/780281505826299904.json
And here's my entities object:
{
:hashtags=>[{:text=>"rescue", :indices=>[17, 24]}, {:text=>"SAR", :indices=>[110, 114]}],
:symbols=>[],
:user_mentions=>[
{:screen_name=>"Ravensoars", :name=>"Jim", :id=>2568464354, :id_str=>"2568464354", :indices=>[38, 49]},
{:screen_name=>"CoquitlamSAR", :name=>"Coquitlam SAR", :id=>203212566, :id_str=>"203212566", :indices=>[54, 67]}
],
:urls=>[{:url=>"SHORTENED_URL", :expanded_url=>"https://twitter./i/web/status/780281505826299904", :display_url=>"twitter./i/web/status/7…", :indices=>[116, 139]}]
}
No images, or even a media key, despite there being several when you view the tweet directly.
Any way to get those images?
Share Improve this question asked Sep 26, 2016 at 18:06 goddamnyouryangoddamnyouryan 6,90615 gold badges58 silver badges108 bronze badges2 Answers
Reset to default 9Look like twitter updated their API last week. Needed to add tweet_mode: 'extended'
to my calls.
For those using oAuth Twitter Feed for Developers you simply add ['tweet_mode' => 'extended']
as the third parameter on your getTweets() function.
Example:
<?php $tweets = getTweets($number_of_tweets, $twitter_screenname_to_load, ['tweet_mode' => 'extended']); ?>
本文标签: javascriptTwitter API not returning imagesStack Overflow
版权声明:本文标题:javascript - Twitter API not returning images - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744722595a2621784.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论