开发者

Displaying Album Info via JSON Facebook Graph API

I've been looking through the different threads on the Facebook Graph API and displaying the results via JSON. The examples are great but I only want to output the info开发者_C百科 for a particular album not loop through various results.

Here is a link to the Coca-Cola Wall Photos album. https://graph.facebook.com/99394368305

What I would like to do is display the Name of the Album and the Link.

Any help is much appreciated!


You can choose only the fields you want by specifying the fields query parameter:

https://graph.facebook.com/99394368305/?fields=name,link

From http://developers.facebook.com/docs/reference/api/#reading:

Selection

By default, most object properties are returned when you make a query. You can choose the fields (or connections) you want returned with the "fields" query parameter. For example, this URL will only return the id, name, and picture of Ben: https://graph.facebook.com/bgolub?fields=id,name,picture

You can also request multiple objects in a single query using the "ids" query parameter. For example, the URL https://graph.facebook.com?ids=arjun,vernal returns both profiles in the same response.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜