开发者

how to store facebook profile pic in database?

as we know that to get a profile picture we use this url (graph.facebook.com/17002786开发者_如何学Python11/picture) but when i want to store it in database it is not working can anybody tell me how to save that image in database as we know this url (graph.facebook.com/1700278611/picture) redirect to this url (http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs222.ash2/48814_1700278611_949486_q.jpg) so pls help thanks in advance


You can just store img_url as graph.facebook.com/FB_USER_ID/picture in database. In your webpages, you can simply use that URL like <img src="http://graph.facebook.com/FB_USER_ID/picture" /> to display the image.

You do not really need to know the "real" image URL. In-fact, that may eventually get defunct if user delets or changes his profile image. So, real image URL may not be advantageous. On the other hand, the symbolic URL provided by graph API will always point to the latest user image.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜