I'm making an application that retrieve tweets on Twitter of a user.
Those feeds contains links to external resources, such as Artciles, Webpage or YouTube video.
I get trought the Twitter API the JSON of these feeds, but there arent included the og:
attributes of the content. And I'd like to catch them and show to my website.
Such as this question of StackOverflow:
<meta name="og:type" content="website" />
<meta name="og:image" content="http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon@2.png?v=fde65a5a78c6"/>
<meta name="og:title" content="How can I check classes that ends with?" />
<meta name="og:description" content="I have some elements such as:
&lt;div class="button 17-facebook-dashboard-check"&gt;Elem1&lt;div&gt;
&lt;div class="button 18-google-dashboard-check"&gt;Elem2&lt;div&gt;
&lt;div class="button " />
<meta name="og:url" content="https://stackoverflow.com/questions/19001883/how-can-i-check-classes-that-ends-with"/>
I'd like to catch those informations for each shared resource on each tweet.
So I think I'll, for each tweet (which for me is a box) do an ajax request client side, download the html and parse it, retrieving og:title
, og:description
, og:type
and og:image
.
Is this the best approch? What's about parse this data in Javascript/Jquery?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…