2

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 thumbnail picture with size 128x128.

and other one http://graph.facebook.com/1571886379501082/thumbnails ~> this one will return big thumbnail picture but it required access_token to get.

is it possible to get big thumbnail video picture without login on facebook?

TomSawyer
  • 3,711
  • 6
  • 44
  • 79
  • 1
    The `picture` edge of a node is the only thing that still works without any access token (intended use is to display user profile pictures, without requiring the viewing user to login first.) _Everything else_ needs an access token from API v2 on. If you don’t want to force your app users to login, then fetch the data server-side, using an app or page access token. – CBroe Aug 04 '15 at 11:25

2 Answers2

-1

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.

Moxet Khan
  • 235
  • 1
  • 9
  • i've changed thumbnail size path before but didn't work. did you ever notice the string behind gda parameter? how to get these string? if this string is not correct, you'll fail to get image thumbnail. – TomSawyer Aug 23 '15 at 17:13
  • Yes! creating GDA parameter is an obstacle but you can resolved by following this topic which has some reg-ex http://stackoverflow.com/questions/26002222/how-to-base64-encode-an-image-from-the-facebook-api – Moxet Khan Aug 23 '15 at 18:35
  • i've read your article, but didn't see any way to get oh or gad parameters. can you tell me more detail? – TomSawyer Aug 24 '15 at 04:19
-1

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

Nadal
  • 105
  • 7