Link Preview details not coming in response

restapi

#1

End Point: https://api.twitter.com/1.1/statuses/show/{id}.json

If tweet contains any link , in twitter.com we are showing link preview. But in api response we are just getting link alone. To make preview we need image / picture , link , title and description kind of details.

Example: https://twitter.com/RajiitGct/status/

API Response:

{
“column1”: “830056219482128385”,
“value”: [-] {
“in_reply_to_status_id_str”: null,
“in_reply_to_status_id”: null,
“favoriters”: [-] [
],
“created_at”: “Fri Feb 10 14:09:59 +0000 2017”,
“in_reply_to_user_id_str”: null,
“source”: “Twitter Web Client”,
“retweet_count”: 0,
“space”: “65661626”,
“retweeted”: false,
“network”: “twitter”,
“geo”: null,
“filter_level”: “low”,
“in_reply_to_screen_name”: null,
“is_quote_status”: false,
“id_str”: “830056219482128385”,
“in_reply_to_user_id”: null,
“favorite_count”: 0,
“id”: 830056219482128385,
“text”: “https://t.co/sc1eCk73AA”,
“place”: null,
“lang”: “und”,
“favorited”: false,
“favoriters_count”: 0,
“watching_profile_id”: “1605225529”,
“possibly_sensitive”: false,
“coordinates”: null,
“truncated”: false,
“retweeters”: [-] [
],
“super_type”: “new_post”,
“prid”: 208076000000271001,
“timestamp_ms”: “1486735799080”,
“entities”: [-] {
“urls”: [-] [
[-] {
“display_url”: “youtube.com/watch?v=nYzfRI…”,
“indices”: [-] [
0,
23
],
“expanded_url”: “https://www.youtube.com/watch?v=nYzfRIe7wPc”,
“url”: “https://t.co/sc1eCk73AA
}
],
“hashtags”: [-] [
],
“user_mentions”: [-] [
],
“symbols”: [-] [
]
},
“contributors”: null,
“social_post_type”: “Tweet”,
“user”: [-] {
“utc_offset”: -28800,
“friends_count”: 24,
“profile_image_url_https”: “https://pbs.twimg.com/profile_images/420493852059783168/qeV8cvWG_normal.jpeg”,
“listed_count”: 3,
“profile_background_image_url”: “http://abs.twimg.com/images/themes/theme1/bg.png”,
“default_profile_image”: false,
“favourites_count”: 72,
“description”: null,
“created_at”: “Fri Jul 19 05:59:41 +0000 2013”,
“is_translator”: false,
“profile_background_image_url_https”: “https://abs.twimg.com/images/themes/theme1/bg.png”,
“protected”: false,
“screen_name”: “RajiitGct”,
“id_str”: “1605225529”,
“profile_link_color”: “1DA1F2”,
“id”: 1605225529,
“geo_enabled”: true,
“profile_background_color”: “C0DEED”,
“lang”: “en”,
“profile_sidebar_border_color”: “C0DEED”,
“profile_text_color”: “333333”,
“verified”: false,
“profile_image_url”: “http://pbs.twimg.com/profile_images/420493852059783168/qeV8cvWG_normal.jpeg”,
“time_zone”: “Pacific Time (US & Canada)”,
“url”: null,
“contributors_enabled”: false,
“profile_background_tile”: false,
“statuses_count”: 1191,
“follow_request_sent”: null,
“followers_count”: 33,
“profile_use_background_image”: true,
“default_profile”: true,
“following”: null,
“name”: “rajeswari”,
“location”: “chennai”,
“profile_sidebar_fill_color”: “DDEEF6”,
“notifications”: null
}
}
}


#2

This is not included in the public REST API responses. Your app could parse the website that the link points to, though, and look for the Twitter Card or Open Graph meta tags and use these.


#3

There is any idea to include this in future in twitter rest api?


#4

There are currently no plans to include card data in the API responses.