Reputation: 6027
I'm looking to replicate the square thumbnails from facebook's current gallery. They appear to use images 206 pixels on the shortest edge. Then by setting them as the background image (centered horizontally and vertically) they essentially crop any excess off.
Could you assist me with an example fql query?
Hopefully i'm missing something obvious but can't seem to do it from src_small or src_big in photo table.
Upvotes: 0
Views: 386
Reputation: 6027
I managed to figure it out :)
I get the src_big url from photo then simply take the filename and append to https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-ash3/p206x206/
Not sure if it's a "real" solution but it's certainly working at the moment!
http://new.tickett.net/portfolio.php
Screenshot as site is currently in development and may change...
Upvotes: 2
Reputation: 4439
You don't even really need FQL. If you have a User ID, the image you are looking for is:
https://graph.facebook.com/USERID/picture?type=square&width=206
Here is mine using the same request:
You can see where this came from on the Graph API User object /picture connection reference where it is described as:
HTTP 302 redirect to URL of the user's profile picture (use ?type=square | small | normal | large to request a different photo). If you specify ?redirect=false, this connection will return the URL of the profile picture without a 302 redirect. Additionally, you can specify width and height URL parameters to request a picture of a specific size. This will return an available profile picture closest to the requested size and requested aspect ratio. If only width or height is specified, we will return a picture whose width or height is closest to the requested size, respectively; if width=height, we will always return a square picture.
Upvotes: 0