开发者

fql.query method returns empty string in asp.net

I have developed a web application 3 months ago to show facebook users by searching username. To access facebook, I have downloaded facebook dll and got application key, and secret key from facebook.

My web application was working fine and displaying records from facebook. yesterday onwards, my application is not working fine. I could not get response when I search by name.

I have tested the fql in the facebook testAPI tool online. That time I can get response. but the same fql I used in my appliation but it could not get response from facebook when I search by name. If I search by uid i can get response from facebook.

here is my code-

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 />");  

how to search by name in facebook fql.

thanks r.e


Yesterday Facebook was having issues with their API that may have prevented some queries from working. Try it again today and it might work.

Here is facebook's api status page where they report any ongoing issues with the API: http://developers.facebook.com/live_status.php

If it's still not working for you then it's likely the fix that they deployed for yesterday's issue had a bug in it. Here is a similar bug that occured a while ago that sounds just like this one: http://bugs.developers.facebook.com/show_bug.cgi?id=1359. You should open a new bug on the facebook bug tracker if that's the case since that one is old and has already been closed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜