2

I want to get the large facebook video thumbnail using graph. Below code get the small thumbnail

https://graph.facebook.com/VIDEO_ID/picture

This code will return Ex:

https://fbcdn-vthumb-a.akamaihd.net/hvthumb-ak-prn1/632393_10151574602254838_10151574598089838_34404_282_t.jpg

If i replace "t" with "n" i will get the large image

https://fbcdn-vthumb-a.akamaihd.net/hvthumb-ak-prn1/632393_10151574602254838_10151574598089838_34404_282_n.jpg

But how do i get it using facebook graph or replace "t" with "n" using php

Thanks in advance.

zack
  • 484
  • 3
  • 9
  • 25

1 Answers1

2

you can use this php code, its working for me.

<?php 
   $video_id = "10153231379946729"; 
   $xml = file_get_contents('http://graph.facebook.com/' . $video_id); 
   $result = json_decode($xml); 

   $small = $result->format[0]->picture; 
   $medium = $result->format[1]->picture;

   //fetch the 720px sized picture
   $large = $result->format[3]->picture; 
?>

<img src="<?php echo $medium;?>">
Deepak Mishra
  • 297
  • 1
  • 5
  • 15