在ASP.NET中使用Facebook API按名稱進行FQL搜索不起作用。但是,這在5天前工作正常。最近,當我在ASP.NET中使用FQL(Facebook API)按名稱查找人員時,它不起作用。在使用Facebook API的ASP.NET中按名稱進行FQL搜索不起作用?
最近,facebook開發者團隊在做了一些修改後部署了Facebook API。
我可以得到以下FQL響應:
select name, first_name, last_name from user where uid = '1730923544'
我無法得到以下FQL響應(但我可以得到空字符串)
select name, pic_square, profile_url from user where name = 'Suresh Rajan'
這裏是我完整的代碼:
public partial class _Default : System.Web.UI.Page
{
facebook.Components.FacebookService _fb = null;
public _Default()
{
_fb = new FacebookService();
_fb.ApplicationKey = "bfeefa69afdfe81975f0d6136ace3009";
_fb.Secret = "9b672d682e1d8befd06382953fc2615b";
_fb.IsDesktopApplication = false;
}
protected void Page_Load(object sender, EventArgs e)
{
infobel_FacebookMethod();
}
private void infobel_FacebookMethod()
{
try
{
string s = String.Empty;
//I cannot have response for this fql (but getting empty string)
//s = _fb.fql.query("select name, profile_url from user where name = 'Suresh Rajan'");
//Here I can get response
s = _fb.fql.query("select name, from user where uid = '1730923544'");
if (String.IsNullOrEmpty(str1))
Response.Write("Empty Response");
else
Response.Write(str1 + " <br />");
}
catch (Exception exp)
{
Response.Write("Message = " + exp.Message + "<br />");
Response.Write("ToString = " + exp.ToString());
}
}
}
如何在ASP.NET中編寫FQL?
感謝
我覺得你是在一個記錄只搜索...還是我錯 – jjj 2010-02-01 05:46:13
這也許幫助>> HTTP:/ /www.codeproject.com/KB/aspnet/LinqToFqlAddon.aspx – jjj 2010-02-01 05:47:45
但是 _fb.fql.query(「select name,profile_url from user where'='Suresh Rajan'」); //這個FQL是retured響應10天前.. 僅上週,我無法獲得來自Facebook API響應.. 任何想法,,, 感謝 重新 – user263249 2010-02-01 06:00:58