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']); ?>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744722596a4589999.html
评论列表(0条)