Facebook graph photo thumbnail size
I have managed to pull out t开发者_如何学编程hese images using PHP and JSON with Facebook's graph API. This is the URL I used. I only want 3 pictures from the album but I want all the pictures to be displayed in a standard size of 200x175px without distorting the pictures. How can I achieve this? (like displaying pictures in thumbnails in a Facebook album). This is my testing page:
What if you display the image inside a div with fixed height and width with overflow: hidden. The image won't be resized but at least all will be showed in the same size
I am just thinking about this on the fly here, but try styling the "fbimg" class.
Like so:
.fbimg {
height: 200px;
}
If the images are going to be different (different heights and widths)...then I don't believe that you can keep them the same height and width without distortion. But if someone learns a trick how to do that...I want to learn it too. ;)
My solution was to add a:
style="max-width: 100px; max-height: 100px;"
to the "img" output of my parser. You can see all the thing in my github: https://github.com/kyuumeitai/Social-buzz/commit/0baf3c5a86e52e64e04796bdcf22a951eeaff291
精彩评论