problem about fql-Collection of common programming errors
maskedbacon
php facebook api fql
I’m trying to connect to the PHP SDK and retrieve a comment count from an fb:comments plugin I’m using on a project. However, when I try to make a $facebook->api() FQL call it always breaks my page. No error, just no more page processing past the API call.require_once ‘scripts/fb-api/facebook.php’;$facebook = new Facebook(array(‘appId’ => ‘222725974406020’,’secret’ => ‘—‘ ));$result = $facebook->api(array(‘query’ => ‘SELECT post_id FROM comment WHERE xid = 0’, ‘method’ => ‘fql.
PinkFloydRocks
php facebook fql
I’m kinda stuck on this FQL query.I can get places nearby my location but sometimes the GPS is off, and I want to submit a text search for the place I’m at, but this query is not returning any result at all and it even seems that it crashes the rest of my PHP script:SELECT name,description,geometry,latitude,longitude,checkin_count,display_subtext FROM place WHERE name = ‘Oslo’Any help’s greatly appreciated!
???
php fql
I’m a FQL new user!I have a fans page, and I’m a admin. Now,I want to use the FQL to list my fan’s name and fan’s id? Please help me!And thanks!This is what I’ve tried so far – <?php require_once(‘src/facebook.php’); $facebook = new Facebook(array( ‘appId’ => ‘id’, ‘secret’ => ‘secret’, ‘cookie’ => true, )); $result = $facebook->api(array( ‘method’ => ‘fql.query’, ‘query’ => ‘select uid from page_fan where page_id = xxxxxx’ )); $fb_fans = $result[0][‘uid’]; ?> <?php
John McGrath
javascript facebook facebook-javascript-sdk facebook-fql fql
I’m trying to update an app to work with ‘January 2013 Breaking Changes’ enabled, and it looks likes part of the update is breaking my app. The update says “When getting stats about a URL from the link_stat FQL table… we will now use the canonicalized URL to fetch those stats.”I have this in the head tags, which is what I thought determined the canonical URL:<meta content=’http://local.fnnny.com/items/1/html-test’ property=’og:url’>When I comment on one of my pages with the comments plug
user2154767
facebook-fql fql messages
i am currently using an fql query to retreive the body of a message and i’m doing it knowing only the thread id and the message count, for each message:SELECT body FROM message WHERE message_id = ‘”.$thread[‘thread_id’].”_”.$cnt.”‘but i get this error:Uncaught Exception: 9: You are calling methods too frequentlyand it takes minutes to execute. There is another way to retreive all the messages knowing only the thread_id?
esegev
javascript facebook facebook-graph-api fql facebook-comments
I run a very basic FQL query with JavaScript, and keep getting back an error Object {error_code: “2”, error_msg: “Service temporarily unavailable”, request_args: Array[8]}My aim is to read the comment_info.XID of the recent comments posted via Facebook to my website (all the website, not limited to a specific post). This is my code, based on some samples posted on StackOverflow mostly:<div id=”fb-root”></div> <div id=”fbcomments”></div> <script type=”text/javascript”&g
cpilko
javascript facebook fql
I cannot seem to figure this thing out i got everything i wanted working but i cannot get this to work: I want to see if the active loged in user is friends with a specific account and if they are not the user is promt with a add friend window. this is what is got:FB.api({method: ‘fql.query’,query: ‘SELECT uid1, uid2 FROM friend WHERE uid1 = me() AND uid2 = 100001314420757’},function(response) {document.getElementById(“msg2”).innerHTML=’Users are: ‘ + response[0].[something here];} );i think i g
thats_how_i_feel
javascript xml facebook fql
I am not skilled at programming. What I am trying to do is for personal use only and will just make my life easier. I am trying to make a script for Google Sheets that will fetch Facebook insights and display them in the Google doc. I have made this work for simpler values like integers and strings, but in this case, I want to return a list and am not sure how to fetch it or return it.Here is the open source script that I have modified: //// // Facebook Fans Counter // Made by Martin Hassman, ht
Enigma
facebook fql
I wrote an FQL query to get names of friends who tagged me – This is the FQL query which gives me the list of the friends ID’s(It’s Works):SELECT owner FROM photo WHERE object_id IN (SELECT object_id FROM photo_tag WHERE subject=me())Now i want to get their names by querying with this :SELECT name FROM user WHERE uid IN (SELECT owner FROM photo WHERE object_id IN (SELECT object_id FROM photo_tag WHERE subject=me())) But i don’t get the full list of the names, and it’s stops and gives this error
scham
javascript facebook facebook-graph-api facebook-fql fql
I’m attempting to do a Facebook FQL Multiquery (via JS SDK FB.api call) to load a single photo for each of 10 random Facebook friends where they have been tagged (aka “Show 10 random friends and a photo of theirs”). Here is my Javascript array of queries:var queries = {q1:”SELECT uid, name FROM user WHERE uid IN (Select uid2 from friend where uid1 = ” + user_id + ” order by rand() limit 10) “,q2: “SELECT pid, subject from photo_tag where subject in (SELECT uid from #q1) limit 10”,q3:”SELECT src
Matt Fenwick
json facebook-graph-api facebook-fql fql facebook-php-sdk
I made and fql query and saved it into an array$resultposts = $facebook->api(array(‘method’ => ‘fql.query’,’query’ => $fqlQueryposts));To extract the name value I use this:echo $resultposts[‘first_name’];But I have problems with “media” array, that it’s into “attachment” array. This is the structure: $resultposts>attachment>media>I should extract “type”, “src” and “href” values from “media” array. I tried in this way: $resultposts[‘attachment’][‘media’][‘type’];But it doesn’t
Antonio Santos
facebook facebook-fql facebook-javascript-sdk fql
This is my code but doesn’t work:FB.api({method: ‘fql.query’,query: ‘SELECT uid, first_name, last_name FROM user WHERE uid=100002306311953’},function(data) {alert(data.uid);} );});I get “undefined” in the alert. Why ?
Stefan Perju
javascript facebook fql
I call the facebook fql to get all members of a group. If i check allmembers in the first function, it works just fine, but when i call it in the second one, in returns “undefined”.function getAllMembers(groupid){var allmembers = new Array();var content = document.getElementById(‘content-text’);FB.api({method: ‘fql.query’,query: ‘select uid from group_member where gid =’ + groupid},function(resp){for (var i=0, l= resp.length; i<l; i++){allmembers[i] = resp[i].uid;}return allmembers;}) }fun
phwd
python http facebook-graph-api facebook-fql fql
I’m trying to make an FQL query with the following code:def get_postData(to_post, access_token):postData = {}postData[“method”] = “fql.query”postData[“query”] = to_postpostData[“access_token”] = access_tokenreturn postDatadef make_request(url, to_post, access_token):postData = get_postData(to_post, access_token)return requests.post(url, data = postData).json()[u’data’]Using POST requests is not the best documented in the docs, and I’m unable to get this to work. With either “fql.query” or “fql”
Ryan
facebook facebook-fql fql
Let’s take a simple FQL query to get all links shared by a user’s friends since yesterday for example:SELECT link_id, title, url, owner, created_time FROM link WHEREcreated_time > strtotime(‘yesterday’) ANDowner IN (SELECT uid2 FROM friend WHERE uid1 = me()) LIMIT 100If a user has 50 friends, this will execute perfectly. But if a user has hundreds of friends, more often than not Facebook returns an error.Options:Limit the friend select query to 50 — Sure, that will work, but it will show th
Timofey Stolbov
php facebook api fql
When i run this code some times it works and other times it doesnt and gives this exception Exception: 1: An unknown error occurredHere is the code$user_access_token= $rowsUser[‘access_token’]; $user= $rowsUser[‘userId’]; $email= $rowsUser[’email’];$facebook = new Facebook(array(‘appId’ => APP_ID,’secret’ => APP_SECRET,’cookie’ => true, ));$access_token=$facebook->setAccessToken($user_access_token);try{$fql = ‘SELECT relationship_status,website,contact_email,work,education,current_l
phwd
facebook facebook-fql fql fql.multiquery
I got several iOS apps that make an FQL multiquery to get infos about events by a certain creator.query1: “SELECT eid, uid FROM event_member WHERE uid = %@”query2: “SELECT eid, name, venue, location, start_time, creator FROM event WHERE eid IN (SELECT eid FROM #query1) AND start_time>%@ AND creator = %@” up until yesterday, March 12th 2013 this worked just fine. Now it returns an “unknown error”.if i change query2 to”SELECT eid, name, venue, location, start_time, creator FROM event WHERE
Caio Vertematti
facebook facebook-graph-api facebook-like comments fql
So, here’s my code for getting all likes and comments from the facebook stream table:function getStream(response) {var _arr = response.data[0].fql_result_set;if(_arr.length <= 0 )returnvar _until = _arr[_arr.length-1].created_time;var _q = {“query1”:”SELECT created_time, post_id FROM stream WHERE source_id=me() AND created_time < “+_until+” LIMIT 60″,”query2″:”SELECT user_id FROM like WHERE post_id IN (SELECT post_id FROM #query1)”,”query3″:”SELECT fromid FROM comment WHERE post_id IN (SEL
Marty Beckers
facebook fql facebook-apps facebook-comments
We have a Facebook app that uses the FB comments social plugin. We’re trying to automatically pull the total number of comments that have been posted using that app.We’ve tried using this query:SELECT count FROM comments_info WHERE app_id = 210218945658186However, this returns the following information:{“error”: {“message”: “An unexpected error has occurred. Please retry your request later.”,”type”: “OAuthException”,”code”: 2} }If we query fields other than the count field, the result is properl
Matt Kim
facebook facebook-graph-api fql
I’m trying to get a list of common likes (public) between a user and his friends. I thought this FQL query would work but I’m getting an unknown user error:–get page_id that you have and any of your friends havehttps://api.facebook.com/method/fql.query?query= select uid, page_id from page_fan where uid in (SELECT uid2 FROM friend WHERE uid1 = me()) and page_id in (select page_id from page_fan where uid= me()) &access_token=ABCI’m getting this error:<error_response><error_code>1
Restartit Fbapp
facebook facebook-graph-api fql fql.multiquery
I have a problem using the PHP SDK:$fql=”{‘query1′:’SELECT uid2 FROM friend WHERE uid1=me()’,’query2′:’SELECT author_uid FROM checkin WHERE author_uid IN(SELECT uid2 FROM #query1) AND page_id = $page_id’}”;$friends= $facebook->api(array(‘method’ => ‘fql.multiquery’,’queries’ => $fql,’access_token’ => $access_token));And I use plenty page ids.When I ran this script in https://graph.facebook.com/fql/?access_token=AC&q=QUERIES It works perfect.But when I use the php-sdk, sometime it
Niraj Shah
facebook facebook-fql fql friend photos
How to get tagged photos from particular friend? I’m now using this codeSELECT pid,src,images FROM photo WHERE object_id IN (SELECT object_id FROM photo_tag WHERE subject=$uid)this is the errorFatal error: Uncaught Exception: 1: An unknown error occurred thrown in /FBapps/album-downloader-pro/php-sdk/base_facebook.php on line 1254This one working for some friends? But not for all. Is this a error of query ?
Eric
php facebook facebook-graph-api facebook-fql fql
Up until yesterday (June 20, 2012) my application was running smoothly. As of yesterday, I started receiving this error on literally ALL multiqueries to various pages (but curiously not to the active user).I’m really not sure what other information to provide besides the fact that this application is querying a single days worth of information from the ‘insights’ table as well as a few other metrics from other tables… but that has never been a problem for me.I’ve looked at a few bug reports bu
Peter Mortensen
php facebook facebook-fql fql fql.multiquery
When I try to do an FQL to catch all the photos in a friend’s checkins, I’m getting an unknown error from the Facebook API.Here’s my code:$photo_params = array(‘method’ => ‘fql.query’,’query’ => “SELECT attachment, post_id FROM stream WHERE post_id IN ( SELECT post_id FROM checkin WHERE author_uid in (SELECT uid2 FROM friend WHERE uid1 = me()))”,); //Run query$result_photo = $fbapi->api($photo_params);I’ll handle the attachment data to get the photo’s URL then.How do I fix this?
Devin Dixon
php facebook facebook-fql fql
I’m running an FQL Query and I keep this error but can’t figure out why because the error message tells me nothing. The query and error are:SELECT backdated_time, can_backdate, caption, created_time, owner, owner_comment, picture, summary, title, url FROM link WHERE owner IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND (strpos(lower(summary),”boston”) >=0 OR strpos(lower(owner_comment),”boston”) >=0 ) LIMIT 20Fatal error: Uncaught Exception: 1: An unknown error occurredthrown in /Facebo
Vadim Khohlov
facebook-fql fql
I am trying to perform this FQL request:https://api.facebook.com/method/fql.query?access_token=token1&query=select+uid%2Cfirst_name%2Clast_name%2Cbirthday_date%2Cwork_history%2Cprofile_url%2Cwebsite%2Chometown_location%2Cpic_square+from+user+where+uid+IN+%28select+uid2+from+friend+where+uid1%3Dme%28%29%29&format=json (of course, I don’t show real token)Facebook API returns error: {“error_code”:1,”error_msg”:”An unknown error occurred”}The same request with another token works correctly.
Devin Dixon
php facebook facebook-graph-api facebook-fql fql
I have this error when I try to query photos or links that my friends have based on key words. Here is some examples:Photo QuerySELECT caption, owner FROM photo WHERE owner in (SELECT uid2 FROM friend WHERE uid1 = me()) AND (strpos(lower(caption),”country”) >=0 OR strpos(lower(caption),”countri”) LIMIT 20Link QuerySELECT caption, owner FROM link WHERE owner in (SELECT uid2 FROM friend WHERE uid1 = me()) AND (strpos(lower(caption),”country”) >=0 OR strpos(lower(caption),”countri”) >=0) L
matheusjardimb
android facebook facebook-graph-api fql facebook-android-sdk
I’ve started facing some problems with Facebook FQL without any change to my code. And they’re also getting solved without any change! I’m receiving this annoying message that has no clear indication of the problem and possible solutions.{“error”: {“message”: “An unknown error has occurred.”,”type”: “OAuthException”,”code”: 1} }I’ve been using FB-SDK for Android and changed it to parse content from url (GET) and the problem still existing. I’m trying to trigger this simple query (that works in t
Web site is in building