Facebook页面提要和照片
I want to show in my home the last feed of my Facebook page, I'm then hooking at this link: https://www.facebook.com/feeds/page.php?id=204770913907&format=json The problem is that facebook provides images in this format: https://www.facebook.com/photo.php?fbid=10151523034618908&set=a.10150426023073908.381002.204770913907&type=1
And then I'm trying to convert them in direct jpg format, but the variables listed in the link above does not help to make up what should be the following link: https://fbcdn-sphotos-ga.akamaihd.net/hphotos-ak-ash3/733911_10151523034618908_777095662_n.jpg
How can I do it?
Use a regexp to get the image from the content field
preg_match('/.*(class="img" src=")([^"]+)(".*)/',$test,$matches);
echo $matches[2]; //img
Or use the facebook api to get your picture
http://developers.facebook.com/docs/reference/api/using-pictures/