javascript - How long is the picture url from FB Open Graph User Object valid? -


i have facebook application, have included facebook javascript sdk , works quite good.

i asking user basic permissions, want application query after picture object on users profile.

this code:

fb.login(function(response) {     if (response.authresponse) {         console.log('welcome!  fetching information.... ');          fb.api('/me/picture?type=square', function(response) {             if( !response.data.is_silhouette ){                 var url = response.data.url; // how long data exist?                 console.log('you have avatar on profile!');              }else{                 console.log('you have no avatar uploaded profile!');             }         });      } else {         console.log('user cancelled login or did not authorize.');     } }); 

it retrieves profiles avatar image. how long url picture valid? expect url temporary.

afaik image valid forever, or @ least until user decides delete it. after it´s static url.

but: if want stay up-to-date actual user picture, can use graph url of user:

http://graph.facebook.com/[user-id]/picture?type=square


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -