[英]Get list of Albums facebook c# sdk
Using c# or vb.net how can Obtain a list of album IDs? 使用c#或vb.net如何获取专辑ID列表?
I can get the JSONObject
but don't know how to extract the IDs. 我可以获取JSONObject
但不知道如何提取ID。
This is as far as I get in VB : 据我在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? 如何仅将专辑ID放入新阵列?
I am not into VB so you can do something in c# you got to figure way via VB yourself. 我不喜欢VB,因此您可以自己在C#中通过VB来解决问题。
This works in c# 这在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");
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.