开发者

Get list of Albums facebook c# sdk

开发者 https://www.devze.com 2023-02-15 11:26 出处:网络
Using c# or vb.net how can Obtain a list of album IDs? I can get the JSONObject but don\'t know how to extract the IDs.

Using c# or vb.net how can Obtain a list of album IDs?

I can get the JSONObject but don't know how to extract the IDs.

This is as far as I get in 开发者_Python百科VB:

 Dim fbApp = New FacebookClient(accessToken.Text)
 Dim albums = DirectCast(fbApp.[Get]("me/albums"), IDictionary(Of String, Object))

How can i get just albums IDs into a new array?


I am not into VB so you can do something in c# you got to figure way via VB yourself.

This works in c#

//Get the album data
dynamic albums = app.Get("me/albums");
foreach(dynamic albumInfo in albums.data)
{
   //Get the Pictures inside the album this gives JASON objects list that has photo attributes 
   // described here http://developers.facebook.com/docs/reference/api/photo/
   dynamic albumsPhotos = app.Get(albumInfo.id +"/photos");
}
0

精彩评论

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

关注公众号