3 个月前,我开发了一个 Web 应用程序,通过搜索用户名向 facebook 用户展示。要访问 facebook,我已经下载了 facebook dll 并从 facebook 获得了应用程序密钥和密钥。
我的 Web 应用程序运行良好并显示来自 facebook 的记录。从昨天开始,我的应用程序无法正常工作。当我按名称搜索时,我无法得到回应。
我已经在线测试了 facebook testAPI 工具中的 fql。到时候我可以得到回应。但是我在应用程序中使用的 fql 相同,但是当我按名称搜索时,它无法从 facebook 获得响应。如果我通过 uid 搜索,我可以得到来自 facebook 的回复。
这是我的代码-
facebook.Components.FacebookService fb = new FacebookService();
fb.ApplicationKey = "bfeefa69afdfe81975f0d6136ace3009";
fb.Secret = "9b672d682e1d8befd06382953fc2615b";
fb.IsDesktopApplication = false;
//the below fql gives response as xml.
//select name, profile_url from user where uid = '1730923544' -I can get response for this fql.
//the below fql does not give response as xml. But it gives empty string.
//the below fql does gives us response as xml when i try in facebook testAPI.
//select name, profile_url from user where name = 'Suresh Rajan' -I couldn't get response for this fql.
string s = fb.fql.query("select name, pic_square, profile_url from user where name = 'Suresh Rajan'");
if (String.IsNullOrEmpty(str1))
Response.Write("Empty Response");
else
Response.Write(str1 + " <br />");
如何在 facebook fql 中按名称搜索。
谢谢重新