Im trying to recreate a user's stream and present it the same way Fb does with a little picture r开发者_运维百科epresenting persone/page/group and what was posted. In order to objtain the picture, i have to query the user table for users, page table for pages, etc. But looking at the stream table, it doesnt look like it can tell me what exactly made the post, only its ID. How do could i determine what table to query in order to get the objects picture?
All you need is the ID. You can then use this url format for the picture:
https://graph.facebook.com/4/picture?type=square
https://graph.facebook.com/4/picture?type=small
https://graph.facebook.com/4/picture?type=normal
https://graph.facebook.com/4/picture?type=large
Just replace 4 with the ID you get. This works for pages, people, etc.
精彩评论