Twitter Video issue from REST API


#1

For the JSON Object from Search API:

{
    createdAt=TueOct2715: 29: 06IST2015,
    id=658946013307256832,
    text='https: //t.co/J6OJtful2q',
    source='<ahref="http://webuinqa.sprinklr.com"rel="nofollow">SprinklrnQA</a>',
    isTruncated=false,
    inReplyToStatusId=-1,
    inReplyToUserId=-1,
    isFavorited=false,
    inReplyToScreenName='null',
    geoLocation=null,
    place=null,
    retweetCount=0,
    isPossiblySensitive=false,
    contributorsIDs=[
        J@47f431e,
        retweetedStatus=null,
        userMentionEntities=[
            
        ],
        urlEntities=[
            
        ],
        hashtagEntities=[
            
        ],
        mediaEntities=[
            MediaEntityJSONImpl{
                id=658946007603007488,
                url=https: //t.co/J6OJtful2q,
                mediaURL=http: //pbs.twimg.com/ext_tw_video_thumb/658946007603007488/pu/img/8RonYzRtEiTUMx2F.jpg,
                mediaURLHttps=https: //pbs.twimg.com/ext_tw_video_thumb/658946007603007488/pu/img/8RonYzRtEiTUMx2F.jpg,
                expandedURL=http: //twitter.com/pramilathakur11/status/658946013307256832/video/1,
                displayURL='pic.twitter.com/J6OJtful2q',
                sizes={
                    0=Size{
                        width=150,
                        height=150,
                        resize=101
                    },
                    1=Size{
                        width=340,
                        height=204,
                        resize=100
                    },
                    2=Size{
                        width=600,
                        height=360,
                        resize=100
                    },
                    3=Size{
                        width=600,
                        height=360,
                        resize=100
                    }
                },
                type=photo
            }
        ],
        currentUserRetweetId=-1,
        user=UserJSONImpl{
            id=3288902376,
            name='sumit',
            screenName='pramilathakur11',
            location='Bengaluru,
            Karnataka',
            description='',
            isContributorsEnabled=false,
            profileImageUrl='http: //pbs.twimg.com/profile_images/640868192550678528/rdxYrmf4_normal.png',
            profileImageUrlHttps='https: //pbs.twimg.com/profile_images/640868192550678528/rdxYrmf4_normal.png',
            url='null',
            isProtected=false,
            followersCount=14,
            status=null,
            profileBackgroundColor='C0DEED',
            profileTextColor='333333',
            profileLinkColor='0084B4',
            profileSidebarFillColor='DDEEF6',
            profileSidebarBorderColor='C0DEED',
            profileUseBackgroundImage=true,
            showAllInlineMedia=false,
            friendsCount=258,
            createdAt=ThuJul2320: 48: 52IST2015,
            favouritesCount=51,
            utcOffset=-1,
            timeZone='null',
            profileBackgroundImageUrl='http: //abs.twimg.com/images/themes/theme1/bg.png',
            profileBackgroundImageUrlHttps='https: //abs.twimg.com/images/themes/theme1/bg.png',
            profileBackgroundTiled=false,
            lang='en',
            statusesCount=514,
            isGeoEnabled=false,
            isVerified=false,
            translator=false,
            listedCount=1,
            isFollowRequestSent=false
        }
    }

The status : https://twitter.com/pramilathakur11/status/658946013307256832/

But no video tag in the extended media Entity is shown. Instead, a “PHOTO” tag is shown.


#2

The Search API does not currently return video or multiple image extended entities. You’ll have to pull them from the Tweet object returned via statuses/lookup.