is there any way to get profile pic of a user
as it appears into timeline profile(the one shown into 135px*135px
box)?
Asked
Active
Viewed 715 times
2
-
Why don't you just get the full size image and scale it down? What language are you using? – Lix Feb 12 '12 at 18:39
-
1i am using php but i want it to be exactly as it appears into users timeline. – Feb 12 '12 at 18:42
1 Answers
2
You can just take the result from /user/picture
API call, which will be something like https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/275322_662949469_2141062370_q.jpg
and replace the _q
for _n
, so it will be:
https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/275322_662949469_2141062370_n.jpg
Actually it's not 135x135, but that's the one facebook uses on timeline. In my case it's scaled down by 136x125 inside a 125x125 div
with overflow: hidden
, so everything more than 125x125 is hidden. You can take a look using DOM Inspector or Firebug

Leonel
- 825
- 11
- 19
-
2there is no need to replace _q for _n you can get it directly from `user/picture?type=large` and that's not i am asking about what i am asking is how to get exactly the way it is shown in the timeline. – Feb 18 '12 at 05:09
-
+1 for the `?type=large`, but I answered your question too! If you use the DOM Inspector you'll notice that picture as being the large one, inside a 4px white border container, centered through javascript, exactly the same way I did on this site: http://www.meutunaosabeoqueaconteceu.com.br/ (on the posts section) – Leonel Feb 21 '12 at 23:19