Link Preview

FREEMIUM
От proclink | Обновлено एक महीने पहले | Media
Health Check

N/A

Назад ко всем обсуждениям

Thumbnail Preview

Rapid account: Dasalazar 1
dasalazar1
7 वर्ष पहले

Hi, I’ve tried a few links through the demo but none are producing a thumbnail. Is this feature not included yet?

Rapid account: Proclink
proclink Commented 7 वर्ष पहले

Hi,

Did you try this:

curl --get --include 'https://proclink.p.mashape.com/oembed?url=https%3A%2F%2Ftechcrunch.com%2F' \
  -H 'X-Mashape-Key: mFq1WJbGDamshaA8SJO8KUDG7wQHp1hnTPUjsnlbYpsdgjyLcv' \
  -H 'Accept: application/json'

?

It produces a the following JSON:

{
  "type": "link",
  "url": "https://techcrunch.com/",
  "provider_url": "https://techcrunch.com",
  "provider_name": "TechCrunch",
  "title": "TechCrunch",
  "description": "TechCrunch is a leading technology media property, dedicated to obsessively profiling startups, reviewing new Internet products, and breaking tech news.",
  "width": 0,
  "height": 0,
  "thumbnail_url": "https://tctechcrunch2011.files.wordpress.com/2016/01/6939d252d9af4c1aa282b6129e5a908a.jpg?w=764&h=400&crop=1",
  "thumbnail_width": 764,
  "thumbnail_height": 400,
  "author_name": "",
  "author_url": "",
  "html": ""
}

Which provides thumbnails URL.

Not all sites have thumbnails, but for those who do - we return it.
Example:

curl --get --include 'https://proclink.p.mashape.com/oembed?url=http%3A%2F%2Flenta.ru%2F'   -H 'X-Mashape-Key: mFq1WJbGDamshaA8SJO8KUDG7wQHp1hnTPUjsnlbYpsdgjyLcv'   -H 'Accept: application/json'

For this request we return

{
  "type":"link",
  "url":"https://lenta.ru/",
  "provider_url":"https://lenta.ru",
  "provider_name":"Lenta.RU",
  "title":"Лента.Ру",
  "description":"Новости, статьи, фотографии, видео. Семь дней в неделю, 24 часа в сутки.",
  "width":0,
  "height":0,
  "thumbnail_url":"https://icdn.lenta.ru/assets/webpack/images/04ceff52e5b673154a365683e768578e.lenta_og.png",
  "thumbnail_width":1200,
  "thumbnail_height":630,
  "author_name":"",
  "author_url":"",
  "html":""
}

We also support embedded content, like youtube/vimeo:

curl --get --include 'https://proclink.p.mashape.com/oembed?url=https://vimeo.com/239650634'   -H 'X-Mashape-Key: mFq1WJbGDamshaA8SJO8KUDG7wQHp1hnTPUjsnlbYpsdgjyLcv'   -H 'Accept: application/json'

Will result into this:

{"type":"video","url":"https://vimeo.com/239650634","provider_url":"https://vimeo.com/","provider_name":"Vimeo","title":"Spoon - Do I Have To Talk You Into It?","description":"Directed by Brook Linder\nProducer: Frances Capell\nExecutive Producer: Evan Cohen\nProduction Company: treeboy pictures\nDirector of Photography: Frank Mobilio\nAssistant Camera: Steven Doyle\nGaffer: Chris Walters\nHair/Makeup: Candice Birns\nAnimation: Adam Padilla, Jack Wagner\nPhoto Editors: Anthony Isaac, Vlad Sepetov, Kelsie Pickle\nColor: Kaitlyn Battistelli","width":0,"height":0,"thumbnail_url":"http://i.vimeocdn.com/video/662682387_640.jpg","thumbnail_width":640,"thumbnail_height":360,"author_name":"Brook Linder","author_url":"https://vimeo.com/brooklinder","html":"\u003ciframe src=\"https://player.vimeo.com/video/239650634\" width=\"640\" height=\"360\" frameborder=\"0\" title=\"Spoon - Do I Have To Talk You Into It?\" webkitallowfullscreen mozallowfullscreen allowfullscreen\u003e\u003c/iframe\u003e"}

Vitaly.

Присоединяйтесь к обсуждению – добавьте комментарий ниже:

Войдите / Зарегистрируйтесь, чтобы публиковать новые комментарии