facebook-fql

How can I execute a FQL query with Facebook Graph API

本秂侑毒 提交于 2019-12-04 07:27:30
问题 I'm looking without any success for a way to execute a FQL(facebook query language) query with the new Open Graph API. Does anyone know how I can do this? Found the answer here with this excellent example: http://code.google.com/p/facebook-cpp-graph-api/ 回答1: Here's an example of how to do a FQL query using the Graph API and JavaScript FB.api( { method: 'fql.query', query: 'SELECT uid, first_name, last_name FROM user WHERE uid = ' + someUid }, function(data) { // do something with the

How to get mutual facebook likes between users who are using an app

房东的猫 提交于 2019-12-04 06:23:33
Let's say two users are using an application and have granted the application appropriate permissions to retrieve their likes. Is it possible using FQL or the graph api to find what likes they have in common? Similar to how you can find mutualfriends between two users using the graph api. I don't think such an api call exists as I went through the docs but I may have missed it. I'd like to know if this is possible and if so, how it can be done. I really stink with SQL and just started with FQL and can get all the likes from a single user, but how do you get only the common likes between two

Retrieve Facebook users who like a URL/web page

99封情书 提交于 2019-12-04 05:10:36
问题 How can I retrieve the list of Facebook users that have clicked the like button on an external site? Say I have a like button: <fb:like href="http://example.com/xyz"></fb:like> I'd like a list of FB user IDs of people who have liked it. I've tried OpenGraph: https://graph.facebook.com/OBJECTID/likes/ (where OBJECTID is the id of the like example.com/xyz) and FQL select user_id from like where object_id in ( select id from object_url where url = 'http://example.com/xyz')) but both return empty

FQL SELECT query with IN ,NOT Keyword

倖福魔咒の 提交于 2019-12-04 04:57:19
问题 I'm trying to retrieve all my friends expect few people. I formed the query like this SELECT uid,name FROM user WHERE uid NOT IN ($x) Retrieve every one expect those people who are in $x. This is giving me an fatal error Uncaught Exception: 601: Parser error: unexpected 'NOT Thanks in advance! 回答1: You can use WHERE NOT (columnName IN (things 'not in') Like this example : SELECT post_id, message FROM stream WHERE source_id IN ( SELECT page_id FROM page WHERE name='coca-cola' ) AND NOT

how to get data from Json object?

大兔子大兔子 提交于 2019-12-04 01:28:23
问题 i am working on a android app which is integrated with facebook . i am using fql query to fetch info from facebook. my fql method is void runfql(){ String fqlQuery = "SELECT uid, name, pic_small,birthday FROM user WHERE uid IN " + "(SELECT uid2 FROM friend WHERE uid1 = me() )"; Bundle params = new Bundle(); params.putString("q", fqlQuery); Session session = Session.getActiveSession(); Request request = new Request(session, "/fql", params, HttpMethod.GET, new Request.Callback(){ public void

How to do batch request of fql queries in graph api?

半世苍凉 提交于 2019-12-03 21:55:09
I am having 4-5 fql queries in single function. Each of them taking 2-4 seconds to execute. Total 14-15 seconds are required to execute that whole function. User required to wait for long time. So I want to reduce that processing time. ( There is not well supported multi-threading concept in PHP.) I have heard of batch request concept in graph api. And I have googled a lot but didn't understand how to use batch request for fql queries in graph api. Can anyone give explanation with example for using batch request of fql queries ? By what time query processing time will reduce? Is there any

Starting multiquery in client throws parser error

不打扰是莪最后的温柔 提交于 2019-12-03 21:33:41
I have a following problem in c# SDK: when I try to run multiquery in my desktop application with following string (searching for pairs of IDs of mutual friends) I get a parser error: string strCommonFriendsQuery = "{ \"user_friends\":\"SELECT uid2 FROM friend WHERE uid1 = me()\", \"mutual_friends\":\"SELECT uid1, uid2 FROM friend WHERE uid1 IN (SELECT uid2 FROM #user_friends) AND uid2 IN (SELECT uid2 FROM #user_friends)\" }"; fb.Query(strCommonFriendsQuery); Parser error: unexpected '{' at position 0. The same string (without the escape sequences before quotation marks) works if I paste it to

How to get only photos from user's Facebook newsfeed using graph api?

﹥>﹥吖頭↗ 提交于 2019-12-03 20:49:12
I combed through the Facebook documentation but didn't see an obvious way to return ONLY photos on a user's newsfeed. Specifically: Give a FB access token, I want to get the newsfeed filtered to only photos that were posted. https://graph.facebook.com/me/home?access_token= Returns the entire newsfeed. I see that elements have a "Type" attribute, that has a value of "photo" when it's a photo. How can I scope the response to only return photos? Sure, you can do this using FQL: SELECT post_id, message, attachment FROM stream WHERE filter_key IN ( SELECT filter_key FROM stream_filter WHERE uid =

Using FQL to retrieve only upcoming birthdays from Facebook API

回眸只為那壹抹淺笑 提交于 2019-12-03 20:47:30
Using the information on FQL and the user table from Facebook's Developer's docs, I've come up with the following code. //build fql string $fql = "SELECT name, birthday_date FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND strlen(birthday_date) != 0 AND substr(birthday_date,0,3) IN ('{$currentMonth}/', '{$nextMonth}/')"; $fql.=$orderBy; $fql.=" LIMIT " . $limit; //query facebook $params = array( 'method' => 'fql.query', 'query' => $fql, 'callback' => '' ); $birthdays = $this->facebook_obj->api($params); $currentMonth and $nextMonth are set to string representations of the

How to get who and when a user shared a Facebook post

谁说胖子不能爱 提交于 2019-12-03 17:00:38
For my Facebook posts my friends share (not likes) I would like get who shared it and when. Using the graph api I can get the like or comment information and the number of times a post has been shared. What I am looking for is a graph api call or Facebook fql query for shares which returns a result set similar to this: data": [ { "id": "user_id_1", "name": "Username 1", "created": "some date" }, { "id": "user_id_2", "name": "Username 2", "created": "some other date" } ] I am also looking for the exact thing for long time now. Since Facebook shows the list of users who shared the post, I was