How to get the media type of target link?


#1

In twitter feed, I was able to get the final resolved link from “links.url” property.
Is there any property available to identify whether the target link points to an image or a video or normal HTML page etc?
For ex: if the target link is youtube link, I want the value as video. Similarly, if the target link is some instagram image, I want the value as image.


#2

This kind of metadata is available in some cases. For example, when you receive an interaction containing a link to a Youtube video, the links.meta.opengraph.type field will have the value 'video'. This comes straight from the Facebook OpenGraph data embedded on the shared page, so may not be available in every case.

Please be aware that every share of a 'youtube.com' page may not link directly to a video. For example, someone might share a link to a user's homepage, or a comment on a video. 


#3

I am not getting any value for twitter.media.media_url property even though some of the tweets contain pictures with url starting as pic.twitter.com
for ex: when i went to some screen name, I saw the below tweet :
@BCCI: The new Team India kit is here @nikecricket pic.twitter.com/q2MI49zPs7”
But, using datasift api, i got the below tweet:
@BCCI: The new Team India kit is here @nikecricket http://t.co/q2MI49zPs7

twitter.media.media_url property was empty…any idea when I will get this property?


#4

Can you share the full JSON interaction for this example? The twitter.media.* output fields should be populated in cases where an image is attached to a Tweet via pic.twitter.com