FQL: Know email, first name and last name. What is the FQL code to get the User ID on Facebook? - facebook-fql

I only know the email, first name and last name of a person. Is it possible to get the User ID through FQL? Thank you.

The columns which u are having from the user table in facebook are not indexable. For fetching using the where clause u must have a indexable column. If u will try with these columns u will get the following error
{
"error": {
"message": "Your statement is not indexable. The WHERE clause must contain an indexable column. Such columns are marked with * in the tables linked from http://developers.facebook.com/docs/reference/fql ",
"type": "NoIndexFunctionException",
"code": 604
}
}
So for getting User ID you need to have any of the indexable columns.

Related

How to search by category in Facebook API/FQL

I am learning how to use search on the Facebook Graph API.
I want to format a query that will return all Facebook pages in the category Musician/Band.
Condsider the public page for The Beatles (https://graph.facebook.com/thebeatles), you can clearly see it as a category here.
So far, as I understand it v2.1 of the Graph API does not accept search by category, and I need to use v2.0 FQL. Is this correct?
If so, what would the correct syntax for the following pseudocode:
SEARCH ALL PAGES WITH CATEGORY='MUSCIAN/BAND'.
There's no way to search Pages by Category unfortunately.
The query
select page_id, name from page where categories.name = 'Musician/Band'
fails with
{
"error": {
"message": "(#604) Your statement is not indexable. The WHERE clause must contain an indexable column. Such columns are marked with * in the tables linked from http://developers.facebook.com/docs/reference/fql ",
"type": "OAuthException",
"code": 604
}
}
although the categories.name is marked as indexable (https://developers.facebook.com/docs/reference/fql/page/)

FQL NoIndexFunctionException on indexed field

I'm trying to query the created time for a facebook link by executing the following fql question
SELECT created_time FROM link WHERE owner = me()
according to the developers documentation (https://developers.facebook.com/docs/reference/fql/link) the owner field is indexed but the graph api throws the following exception.
{
"error": {
"message": "Your statement is not indexable. The WHERE clause must contain an indexable column. Such columns are marked with * in the tables linked from http://developers.facebook.com/docs/reference/fql ",
"type": "NoIndexFunctionException",
"code": 604
}
}
what is wrong with my query?
Select the FQL Query button above the text box on the Graph API Explorer and it works fine. The links go to the Graph API editor instead of the FQL editor, which is wrong.
Example

FQL getting a list of non-friend from my current location

I would like to know how to get a list of id facebook's user from my current location,
I just did that SELECT uid , current_location FROM user WHERE current_location = '115175415163151'
but I get the next error
"{
"error": {
"message": "Your statement is not indexable. The WHERE clause must contain an indexable column. Such columns are marked with * in the tables linked from http://developers.facebook.com/docs/reference/fql ",
"type": "NoIndexFunctionException",
"code": 604
}
}"
Sadly you just cannot get User's location as it requires either user_location or friends_location , quoting from User documentation that means you just can't retrieve any User's location without User allowing you the required permission.
Secondly you cannot query on fql without using an indexable column in WHERE clause, quoting from fql documentation
Your query must also be indexable, meaning that it queries properties that are marked as indexable in the documentation below.

How i can get all events from all registered users by using Graph API?

I work on iPhone application that grab events from different channel and show them on map.
Now i try to grab Facebook events in my DB.
I make this request
SELECT name, venue, location, start_time, update_time FROM event WHERE update_time>1358294400
But it doesn't work. Facebook return
{
"error": {
"message": "Error validating access token: Session has expired at unix time 1358528400. The current unix time is 1358761880.",
"type": "OAuthException",
"code": 190,
"error_subcode": 463
}
}
How can i get events by update_time ?
Thanks in advance.
I guess you can not. Since-
The WHERE clause must contain an indexable column. Such columns are marked with * in the tables.
and updated_time is not an indexable column. Only eid and name are indexable in the table event.
So, simply get all the data and then filter manually according to the updated_time

FQL or Facebook API: Get only my events created

i have this query:
select eid from event where creator = 100000956216009
Return this error:
error: 604
Your statement is not indexable. The WHERE clause must contain an indexable column. Such columns are marked with * in the tables linked from
http://wiki.developers.facebook.com/index.php/FQL_Tables
How i can get all My Created events? TIA
I need to print my events created on my fb account and print it on my External Site.
solved, my problem is the permission:
https://developers.facebook.com/docs/reference/api/permissions/
You should read http://developers.facebook.com/docs/reference/rest/events.get