Facebook - Fql.query Method Returns Empty String

Jan 29, 2010

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

how to search by name in facebook fql.

View 1 Replies


Similar Messages:

JQuery .val() Returns Empty String?

Nov 10, 2010

With script below, request to the server always sends empty string (even if value is not emtpty), where the data line is:

data: "{ 'folderName': '" + $(this).val() + "' }"

The html element under investigation is this:

<asp:TextBox id="searcher" runat="server" ClientIDMode="Static" CssClass="classificationFolder" />

Script is:

<script type="text/javascript">
$(document).ready(function () {
$(".classificationFolder").each(function () {

[Code]....

The reason that I select elements by css class selector ($(".classificationFolder")) is that, this control is a user control and used in the same page more than once. That is why I'm not using $("#searcher").

I tested the code In IE8 and Chrome 8.0.552.28 beta. This issue is arising in both of the browsers.

On the other hand, request is sent to the server, client received response successfuly and response is processed on the client.

View 3 Replies

C# - RadioButtonList.Selectedvalue Returns An Empty String

Apr 4, 2011

I define the datasource in my c# code and I have a submit button which takes the value of the radiobuttonlist

asp:RadioButtonList ID="RadioPaidIdList" runat="server" DataValueField ="Label" DataTextField = "Label"

First time i click submit it returns an empty value. And next time i select a radiolist and click submit it returns a proper value.

View 2 Replies

SCOPE_IDENTITY() Returns An Empty String After A Confirmed Insert

Oct 13, 2010

This is completely frustrating and probably embarrassing as well. A while back I posted a similar question and resolved the issue. [URL]...scope_identity The program has been working ever since, until yesterday when as it turns out SCOPE_IDENTITY() started returning an empty string even though a record is being inserted. I am not sure what has changed since the fateful day.

[Code]...

I am hoping that there is something I am just not seeing here. A lot of the information I have seen thus far indicates that there are problems with SCOPE_IDENTITY() but most of those are related to inserting multiple records. As you can see this should be fairly straight forward. The thing that really has got my goat is that it used to work and now it doesn't. If someone could take a look at the above code and comment on any anomalies it would be great. Also I have heard suggestions for switching to ADO.NET and it is beginning to look a lot more attractive every day. But I have a ways to go before making the switch so it is SqlDataSources for now

View 37 Replies

Web Forms :: Have A Function Which Returns A Value From A Query String Parameter?

Mar 18, 2010

i have a function which returns a value from a query string parameter, i use it in more than 10 places in the webapp thus i have to rewrite the code every time, again and again.so to make it short, is there any way i can embed the code somewhere and keep referring to it through out my app?

View 10 Replies

Return All Values From Table If Query String Is Empty

Jan 1, 2010

I have a page that lists products from a table based on the querystring. So if I say foo.aspx?fam=1 all the products from family 1 will be listed. How can I make my code list all the values if query string is empty? My SQL command would have to be different...can't really see how I can do this.

<asp:SqlDataSource ID="ds_produtos" runat="server"
ConnectionString="<%$ ConnectionStrings:LocalSqlServer2 %>"
SelectCommand="SELECT DISTINCT [IdProduct], [Name], [Description], [IdFamily], [Price], [Stock] FROM [Product] WHERE ([IdFamily] = @IdFamily )">
<SelectParameters>
<asp:QueryStringParameter Name="IdFamily" QueryStringField="fam" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>

View 2 Replies

Web Forms :: Exit Sub If Not From Previous Page Or Query String Is Empty

Feb 12, 2010

I'm trying to Exit the Page_Load event if the user did not come from a specific page. If it did I want it to populate the fields based on what i passed from the other page. Here's my code:

Protected Sub Page_Load(ByVal sender
As
Object,
ByVal e
As System.EventArgs)
Handles
Me.Load
If Request.QueryString
Is
Nothing
Then
Exit
Sub
ElseIf Page.IsPostBack
Then
NCMRNumber.SelectedValue = Request.QueryString("NCMRNumber")
NCMRLabel.Text = NCMRNumber.SelectedValue
Dim SQLDataview
As DataView =
DirectCast(SortInstructionsSQL.Select(DataSourceSelectArguments.Empty), DataView)
For
Each DataRow
As DataRowView
In SQLDataview
SupplierNameLabel.Text = DataRow("Supplier").ToString
SupplierContactLabel.Text = DataRow("SupplierContact").ToString
SupplierPhoneLabel.Text = DataRow("SupplierPhone").ToString
PartNumberLabel.Text = DataRow("PartNumber").ToString
DefectDescriptionLabel.Text = DataRow("DescriptionofDefect").ToString
Next
End
If
End
Sub

View 6 Replies

How To Send A Hyperlink Using Query String Method

Aug 27, 2010

I want to send hyperlink by attach it with URL with the of query string method. For instance in a web page containing three links like

[URL]

now suppose user click on yahoo.com at this point i want to send it by attaching with url like [URL]......some thing like that

View 1 Replies

Security :: Method Adds A Return Url To Query String?

Jan 15, 2011

i call FormsAuthentication.RedirectToLoginPage() to redirect to login page. but there is one problem: this method adds a return url to query string.how should i disable this?

View 3 Replies

Forms Data Controls :: Getting Text As Empty String When Gridview Cell Is Empty?

Feb 19, 2010

I have a gridview with two bound fields. On clicking a button i want to display the values in first row of gridview in two textboxes. But if gridview cell is empty i am getting the text in textbox to which the value of cell is given as -' 'i know my problem will be solved if i use the template fields instead. But i want a solution while maintaining the bound fields ,if any.

View 2 Replies

SQL Server :: Select Second Query If First Query Returns Nothing?

Oct 14, 2010

How can I SELECT second if first SELECT returns nothing?

View 8 Replies

ADO.NET :: SP From Linq Returns Empty Or Null Value

Feb 15, 2011

I have a class library which has my LINQ doc in it. I added a stored procedure and I get the following in my .dbml.layout :

[Code]....

I include a reference to the dll of the class library to my web project and I get an error about value being returned as int where I am trying to put contents into a datalist or similar.

Code in class that calls this SP :

[Code]....

So I switched code to the following in my dbml.layout document :

[Function(Name="dbo.sp_newsSearch")]public IEnumerable<news_search_result> sp_newsSearch([Parameter(DbType="VarChar(200)")] string searchVal){IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), searchVal);return ((IEnumerable<news_search_result>)(result.ReturnValue));}

And included the following in an external file news_search_result.cs

[Code]....

But now I just get nothing returned. Is this wrong way of calling a SP via LINQ? or have I just put the wrong return type on my LINQ class?

View 2 Replies

DataTable Is Always Returns Empty Values?

Feb 17, 2011

I'm .NET newbie and I have to write function which executes stored procedure and return DataTable.

my SqlConnection is already initialized and while running in debugger I can see DataAdapter returns values, but my DataTable is empty.

public DataTable ExecStoredProcedure(String spName, String uId)
{
DataTable dt = new DataTable();
try
{
conn.Open();
SqlCommand cmd = new SqlCommand(spName, conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@UnitIDList", uId);
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
}
catch (SqlException ex)
{
throw new Exception(ex.StackTrace + ex.Message);.......

View 1 Replies

Empty String - Check If Textbox Empty?

Sep 5, 2010

I have this code, how will I write the code so I can check if a textbox i empty? This way want work. Now it goes in if cellPhone != null all the time.

[Code]....

View 5 Replies

C# - Facebook Stream.GetComments Is Empty?

Dec 20, 2010

I am using Facebook Toolkit (the old REST API LIB). I have 2 users with comments in FB. both have the right permissions for my application. When I launch Stream.Getcomments I get empty result in one user, and in the other one I get good result.

I tried using the FQL and it still returns empty. When using Facebook FQL test console they offer on their site - it is working ok.

View 1 Replies

Web Forms :: Import Data From Excel Returns Empty Cell

Feb 11, 2010

I am trying to import data from excel and Reading Excel sheet from asp.net returns empty cell, when the data type is changing from number to text example

Prog
----
2000
4000
6000
AN00 -- reading as empty
BN00 --reading asempty

this is the conncetion string i use with vb.Net

Dim strConn As String = "Provider=Microsoft.Jet.OleDb.4.0;" _
& "data source= '" & FileName & "';" _
& "Extended Properties=Excel 8.0;"

View 3 Replies

Security :: VB.NET Returns System.String[] Instead Of The Actual Value Of The String

Dec 24, 2010

I have two sub routines that I've created to pull in my Membership user roles and assign the value/name of that role to the value of a cookie.

My first subroutine looks like this

[Code]....

At this point, role ID is a 1-dimentional array which is not acceptable for a cookie's value (it must be a string), but in Debug mode, I can see that the array does contain the correct roleID value. In my 2nd subroutine I change the value from array to string for no other reason than that it gives me an opportunity to see that the value of CookieValue() before it is converted does have the correct roleID.

[Code]....

Even though it still shows that string as having the correct value, it returns the object "System.String[]"

View 1 Replies

Security :: Role Membership Returns The Error : The Parameter 'username' Must Not Be Empty?

Jul 16, 2010

[Code]....

returns the error: The parameter 'username' must not be empty.Parameter name: usernameI want to check if a user is logged. If not logged in redirect to loginerror.aspx.

View 9 Replies

Security :: When The Function Returns Ssl Value, If It's Not Empty, Then The Master Page Redirects To The New Url... But The Browser Is Not Showing It?

Oct 20, 2010

I'm trying to set up the SSL in my web app, but don't know if i'm doing it right, or if even i'm taking the right steps in the right order.I have a function in a class that returns the secure URL (https://mydomain.com/...aspx) if the current url is not secure (http)

[Code]....

(Though in develop environment It's like "https://localhost:port" + rawUrl)

when the function returns ssl value, if it's not empty, then the master page redirects to the new url... but the browser is not showing it...

View 5 Replies

C# - 'Contains' Method Returns False?

Jan 16, 2011

I've an EntityCollection< T > which contains an element but the Contains method returns false.

I've overriden T's 'Equals' method but the 'Contains' method does not call it (while it's said so in documentation).

When I do foreach (T x in coll), x.Equals(element) returns true.

code:

contains(object entCol, object val)
{
var coll = (ICollection<GraphicSockets>)entCol;
var socket = val as GraphicSockets;
foreach (GraphicSockets sock in coll)
socket.Equals(sock); //true for first element, GraphicSocket's Equals function called
coll.Contains(socket);//false, Equals function not called}

the code i'd actually like to use is

private static bool contains(object entCol, object val)
{
Type entColType = typeof(EntityCollection<>).MakeGenericType(val.GetType());
MethodInfo contains = entColType.GetMethod("Contains");
return (bool)contains.Invoke(entCol, new object[] { val });
}

this worked once but stopped when i started using wcf, i wonder how this contains method works.....

View 2 Replies

C# - The IndexOf() Method Returns -1 All The Time

Aug 26, 2010

i have two data tables with the same structure

the first one has one row of the second one

the second one has set of rows

what i want is to get the row which comes next to the row of the first data table in the second data table.

the first data table his name is :: temp

the second data table his name is :: dt

i do the following:

DataTable temp = new DataTable();
temp = dt.Clone();
DataColumn[] keyColumn = new DataColumn[1];
keyColumn[0] = temp.Columns["photoId"];
temp.PrimaryKey = keyColumn;
temp = (DataTable)(Session["currentImage"]);
DataRow[] drr = new DataRow[1];
index = dt.Rows.IndexOf(temp.Rows[0]);

but the index always comes with one value = -1

although the temp.rows[0] its contents changed all the time

when i write dt.Rows.IndexOf(dt.Rows[1]) for examble i get 1

but this is not what i want to do ,, what i want to do exactly is to get the datarow next to the datarow of the first dataTable in the second dataTable

View 2 Replies

AJAX :: Every Method Returns Null?

Feb 19, 2010

had used ajax.method in my project & its working fine, but now Every Ajax.Method returns null now,

View 1 Replies

ADO.NET :: LINQ Query It Returns Dataq?

Nov 8, 2010

When stepping through my LINQ query it returns dataq,but when I try to return it as Json Result,I get the error 'The query results cannot be enumerated more than once'.
Here is my LINQ and stored proc,

[Code]...

View 3 Replies

Web Forms :: PDF Generation - The Method Returns A Byte Value

Feb 19, 2010

I a method that generates a PDF and the method returns a byte value, but after response.end statement, the shows an error that the "File does not begin with '%PDF-' here is the code:

[Code]....

[Code]....

View 2 Replies

MatchCategory Method Always Returns False Values

Mar 11, 2010

I have a ListView control and under ItemTemplate I have following code:

Code:
<asp:Label ID="Label1" runat="server" Text='<% #MatchCategory(dtCategories.Rows[i]["ID"].ToString().Trim(), Eval("CategoryID").ToString()) %>'></asp:Label>
The MatchCategory method just checks if two values are equal and return true or false. Just below this code I am separately printing dtCategories.Rows[i]["ID"].ToString().Trim() and Eval("CategoryID")

acan see matching values but MatchCategory method always returns false.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved