Getting facebook profile picture

前端 未结 2 1343
执笔经年
执笔经年 2021-02-06 08:44

i need to get the facebook profile picture of anyone by passing their id. But i no need to use facebook API or Graph anything else.. Just i need to give the url with that id.. I

2条回答
  •  情歌与酒
    2021-02-06 09:32

    Well, I think the only options available are:

    • https://graph.facebook.com/[PROFILE_ID]/picture (You can include this URL inside a tag and it will work).
    • Scrap yourself the page corresponding to the profile, i.e. http://www.facebook.com/profile.php?id=[PROFILE_ID] and get the URL of the picture there.

    I would suggest you to use the first one, because it gives you more flexibility about the picture size (?type=small, ?type=thumbnail, etc).

    Edit

    Keep in mind that this answer is from 2011, and Facebook makes changes in its APIs frequently.

提交回复
热议问题