How to get big facebook video thumbnail

前端 未结 2 1908
南笙
南笙 2021-01-27 04:48

I\'m looking for the way to get big facebook video thumbnail. i\'ve found some links:

http://graph.facebook.com/1571886379501082/picture ~> this one retun one small thum

相关标签:
2条回答
  • 2021-01-27 05:32

    This method will create an object array and seek the last key of the format, which is the big image.

    $fb = file_get_contents('http://graph.facebook.com/1246538155392772');
    $fb = json_decode($fb);
    
    //---find the big image which is always last in array
    $key = count($fb->format)-1;
    $bigimg = $fb->format[$key]->picture;
    echo '<img src="'.$bigimg.'" />';
    

    If you just want to get the image for simple posting, just use this tool. Get Facebook Video Images

    0 讨论(0)
  • 2021-01-27 05:40

    When the first URL is hit, the link is refering to

    https://fbcdn-vthumb-a.akamaihd.net/hvthumb-ak-xfa1/v/t15.0-10/p128x128/10876207_805883852835396_1769147834_n.jpg?oh=a755047c692902070f8d9bd79ce28453&oe=56396042&gda=1451498989_6c4cbd42045490d0935990d6627905ed

    For large thumbnail you have to change the size 128x128 to 552x414

    https://fbcdn-vthumb-a.akamaihd.net/hvthumb-ak-xfa1/v/t15.0-10/s552x414/10876207_805883852835396_1769147834_n.jpg?oh=09f92535e931ff2269a7ae4d31c03d5b&oe=563FEF44&gda=1451103467_d60d0b95c7e93f9c9046a0eeeca24c5e

    Kindly figure out with regular expression or something else for proper usage but the above URL works for me.

    0 讨论(0)
提交回复
热议问题