当我输入下面的查询时,我得到一个包含相册中所有照片的Ilist对象
"SELECT pid, src_small, src_big FROM photo WHERE aid = '100003240429199_12493' "
当我在下面输入这个时,我得到0结果。
"SELECT pid, src_small, src_big FROM photo WHERE aid = '730676042_444686' "
我正在为专辑拉上封面照片。这是代码:
var query = string.Format("SELECT pid, src_small, src_big FROM photo WHERE aid = '{0}' ", usrid + "_" + albid);
var result2 = (IList<object>)fb.Query(query);
string hold = "", pid = "", small = "", big = "";
foreach (object g in result2)
{
hold = g.ToString();
string[] sub = hold.Split(',');
pid = sub[0].Replace("{\"pid\":\"", "");
pid = pid.Replace("\"", "");
small = sub[1].Replace("\"src_small\":\"", "");
small = small.Replace("\"", "");
big = sub[2].Replace("\"src_big\":\"", "");
big = big.Replace("\"}", "");
th = new FolderExplorer.ThumbNail(usrid + "_" + albid, big, small);
thmbs.Add(th);
break;
}
}
为什么查询不适用于较旧的facebook帐户(较短的userId) - 我尝试了多个帐户,结果一致。
答案 0 :(得分:0)
我的Facebook帐户较旧,我的相册ID中没有下划线。据我所知,您无法根据用户ID生成相册ID。
你最好运行这样的查询来获取每个用户专辑的所有封面照片
fql?q=SELECT pid, src_small, src_big FROM photo WHERE object_id in (select cover_object_id from album where owner = me())