• Resolved jamminjames

    (@jamminjames)


    I have a page with youtube videos. Is it possible for AddToAny to grab the youtube thumbnail for the thumbnail used with a share of the page?

    Youtube’s videos always have thumbnails with this format:
    https://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg

    So, theoretically, if you could ascertain the video id, you could use it to grab the videos’ thumbnail.

    I also found this bit of php code:

    $data = file_get_contents("https://www.googleapis.com/youtube/v3/videos?key=YOUR_API_KEY&part=snippet&id=T0Jqdjbed40");
    $json = json_decode($data);
    var_dump($json->items[0]->snippet->thumbnails);

    Could I use that with AddToAny to obtain the thumbnail to share?

    Thanks for any help.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author micropat

    (@micropat)

    Since the shared thumbnail is defined in a meta tag, this topic is best raised with whatever plugin (such as Yoast) or theme that handles the meta tags on your pages.

Viewing 1 replies (of 1 total)
  • The topic ‘Possible to programmically get Youtube video thumbnail for share?’ is closed to new replies.