English 中文(简体)
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.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签