简体   繁体   中英

Get facebook profile picture update time using graph api for android

Can anyone tell me how to get the update datatime for profile picture of facebook friend using Graph API for android. In simple words I need to know when a person updated his/her profile picutre in my android application.

Thanks

The user object has a field called updated_time , which reflects some profil updates, including the profile picture. (Although I seem to recall that this was limited to updates occurring within a certain timespan, so you might have to check that regularly.) To see whether it was their profile picture that was updated, or something else, you would have to compare the URL with the previous one, I guess.

The better/easier way would probably be to access the user's album, look for the one with "name": "Profile Pictures" / "type": "profile" , and request the details of it's cover_photo field. (The current profile picture is always the cover picture of that album.)

Then, when looking the ID of the cover photo up, you'll get the two fields created_time and updated_time .

Depending on what exactly you are trying to achieve, you might have to store the last update's timestamp somewhere in your app for comparison.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM