By default, not all fields in a node or edge are returned when you
make a query. You can choose the fields or edges that you want
returned with the fields
query parameter.
That's why when you retrieve a photo, you may only get created_time
, name
and id
.
source
field is deprecated in latest API (v2.8). Use images
instead.
So your query may look like this:
GET graph.facebook.com/{photo-id}?fields=images
Response should be like this:
{
"images":[
{
"height":358,
"source":"https://scontent.xx.fbcdn.net/v/t1.0-9/15327427_585435148333529_xxxxxxxxxxxx_n.jpg?oh=xxxxxxxx&oe=xxxxxxxxx",
"width":518
},
{
"height":320,
"source":"https://fb-s-c-a.akamaihd.net/h-ak-xtl1/v/t1.0-0/p320x320/15327427_xxxxxxxxxxxxxx_n.jpg?oh=xxxxxxxxxx&oe=xxxx&__gda__=xxxxxxxxxxxx",
"width":463
},
{
"height":130,
"source":"https://fb-s-c-a.akamaihd.net/h-ak-xtl1/v/t1.0-0/p130x130/15327427_xxxxxxxxxxxxxx_n.jpg?oh=xxxxxxxxxxx&oe=xxx&__gda__=xxxxxxxxxxxxxxxxxx",
"width":188
},
{
"height":225,
"source":"https://fb-s-c-a.akamaihd.net/h-ak-xtl1/v/t1.0-0/p75x225/15327427_xxxxxxxxxxxxxxx_n.jpg?oh=xxxxxxxxxxxxxxxxx&oe=xxxxxxxxxxxxxxxxxx&__gda__=xxxxxxxxxxxxxxxxxx",
"width":325
}
],
"id":"585435148333529"
}