Let me clarify my question:
I am using statuses/show/:id to fetch Tweet data.
Sample tweet data:
"tweet": {
"contributors": null,
"truncated": false,
"text": "⚡️⚡️⚡️ https://t.co/SV1IGKOOFX",
"is_quote_status": false,
"in_reply_to_status_id": null,
"id": 756224775131848700,
"favorite_count": 3380,
"source": "<a href=\"https://about.twitter.com/products/tweetdeck\" rel=\"nofollow\">TweetDeck</a>",
"retweeted": false,
"coordinates": null,
"entities": {
"symbols": [],
"user_mentions": [],
"hashtags": [],
"urls": [
{
"url": "https://t.co/SV1IGKOOFX",
"indices": [
7,
30
],
"expanded_url": "https://vine.co/v/5ZvYFWa9AFr",
"display_url": "vine.co/v/5ZvYFWa9AFr"
}
]
},
"html": "<blockquote class=\"twitter-tweet\"><p lang=\"und\" dir=\"ltr\">⚡️⚡️⚡️ <a href=\"https://t.co/SV1IGKOOFX\">https://t.co/SV1IGKOOFX</a></p>— Vine (@vine) <a href=\"https://twitter.com/vine/status/756224775131848705\">July 21, 2016</a></blockquote>\n",
"in_reply_to_screen_name": null,
"in_reply_to_user_id": null,
"retweet_count": 1894,
"id_str": "756224775131848705",
"favorited": false,
"user": {},
"geo": null,
"in_reply_to_user_id_str": null,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "und",
"created_at": "Thu Jul 21 20:30:11 +0000 2016",
"in_reply_to_status_id_str": null,
"place": null
}
Now, there is no key as ‘card’ in the above response.
Ques1: What do I want to do.
Ans: Render vine-tweets in a sync manner with expanded vines/videos. (blog link)
Ques2: Why do I need the ‘card’ key? Ans: Because when I pass the above JSON to the TweetView using:
new TweetView(context, tweetData);
Inside the render() function of the BaseTweetView.java is called setTweetMedia(), which required a card object to render vines.
void render() {
....
setTweetMedia(displayTweet);
....
}
final void setTweetMedia(Tweet displayTweet) {
//my value for displayTweet.card == null
if (displayTweet.card != null && VineCardUtils.isVine(displayTweet.card)) {
....
} else if (TweetMediaUtils.hasSupportedVideo(displayTweet)) {
....
}
....
}
Therefore I feel that the API response should contain card key.
Please help with this.