我试图弄清楚如何在 C# 中格式化多查询查询字符串,但我不能使用 C# SDK。到目前为止,这是我尝试过的。
string url = "https://graph.facebook.com/method/fql?q={'q1':'SELECT uid, page_id FROM page_fan WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND page_id IN (SELECT page_id FROM page WHERE 'MyPage' in name)','q2':'select page_id, name, page_url, pic_small, pic_big from page where page_id in (SELECT page_id FROM #q1)','q3':'SELECT uid, name, pic_small FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me() AND (uid2 IN (SELECT uid FROM #q1)))'}&access_token=myaccesstoken&format=json"
和
string url = "https://graph.facebook.com/method/fql.multiquery?queries={'q1':'SELECT uid, page_id FROM page_fan WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND page_id IN (SELECT page_id FROM page WHERE 'MyPage' in name)','q2':'select page_id, name, page_url, pic_small, pic_big from page where page_id in (SELECT page_id FROM #q1)','q3':'SELECT uid, name, pic_small FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me() AND (uid2 IN (SELECT uid FROM #q1)))'}&access_token=myaccesstoken&format=json"
他们都没有工作。有人可以帮忙吗?
WebClient clientUser = new WebClient();
string JsonResult = clientUser.DownloadString(url);
JObject jsonUserInfo = null;
if (!String.IsNullOrEmpty(JsonResult)) jsonUserInfo = JObject.Parse(JsonResult);