graph.facebook.com/me/home photos width and height -


how width , height photos /me/home?

i try

/me/home?fields=picture,width,height 

but no result width , height.

graph api not return size of image in terms of width , height. however, can specify size want retrieve using 'height' , 'width' parameters e.g:

me/picture?width=70&height=90 

also, there default sizes can retrieve using 'type' parameter: https://developers.facebook.com/docs/reference/api/using-pictures/#sizes

in end, can retrieve picture of size , programmatically width , height.

javascript examples:

modern browsers , ie9+:

var width = document.getelementbyid('yourimg').naturalwidth,     height = document.getelementbyid('yourimg').naturalheight; console.log(width, height); 

for ie8-:

var img = new image(), // or document.createelement('img')     width,     height;  img.onload = function() {   width = this.width;   height = this.height; };  img.src = 'http://fbcdn-profile-a.akamaihd.net/hprofile-ak-prn1/626_someid_202729_q.jpg' console.log(width, height); 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -