使用 Facebook API 在 ASP.NET 中按名称搜索 FQL 不起作用。但是,这在 5 天前运行良好。最近,当我在 ASP.NET 中使用 FQL(Facebook API)按姓名查找人员时,它不起作用。
最近,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?
谢谢