facebook-fql

Problem while executing Facebook query

二次信任 提交于 2019-12-02 09:32:08
I am trying to run a FQL for the first time. This is the code I have included in my index.php file: <?php $query="SELECT message FROM status WHERE uid = 544337058";echo $query; ?> <?php include_once ('facebook.php'); $api_key = 'XXXXXXXXXXXXXXX'; $secret = 'XXXXXXXXXXXXXXXXX'; global $facebook; $facebook = new Facebook($api_key, $secret); $result = $facebook->api_client->fql_query($query); ?> <?php echo $result?> I have logged into facebook from a different tab and just trying to read my own status message. However I am getting the following error: SELECT message FROM status WHERE uid = @@@@@@

FQL Graph API: Mutual Friends

…衆ロ難τιáo~ 提交于 2019-12-02 09:11:54
I know you can't get friends of friends, but can you get mutual friends using some query, in a computationally efficient manner? Could I even iterate through my friends to see which of them is friends with a target? Is there any good way to get Mutual friends? You can do it like this: $facebook = new Facebook(array( 'appId' => FB_ID, 'secret' => FB_APP_SECRET, 'cookie' => true, )); $fql = "SELECT id FROM profile WHERE id IN (SELECT uid2 FROM friend WHERE uid1=me())"; $response = $facebook->api(array( 'method' => 'fql.query', 'query' =>$fql, )); This will return the id of the mutual friends.

How to get all events from a facebook Page

南笙酒味 提交于 2019-12-02 08:53:36
问题 There are tons of StackOverflow answers about getting events from a facebook Page. They all list a FQL query and I'm sure they all work great; but since I'm new to this I have no clue as to what context these queries are executed and how to even get far enough to use these queries. Getting all events from a facebook Page should be pretty trivial. There should probably be a complete copy+paste solution in every language but I haven't been able to find it. Ideally, I would like a step-by-step

FQL Multiquery writing join queries

夙愿已清 提交于 2019-12-02 08:50:57
Simply put. I need help building an FQL multi query request that will do the following: Grab the UIDs in from the logged in user's friends list then, Use those IDs to grab all comments and messages (from stream) from the last two weeks Finally, join those results with there usernames Heres the queries I have so far: [1] GRAB_UIDs : SELECT uid2 FROM friend WHERE uid1 = me() [2] GRAB_STREAM (missing the 2 week part and possibly wrong altogether): SELECT type, created_time, post_id, comments, actor_id, target_id, message FROM stream WHERE filter_key IN (SELECT filter_key FROM stream_filter WHERE

How to get friends birthday list from facebook? [duplicate]

旧街凉风 提交于 2019-12-02 08:48:09
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to get friend's birthday list using facebook api? I'm developing an application and all my users are also facebook user. Now I want to send emails from admin section to that user's friends about his birthday. Is this possible? 回答1: It's not possible to retrieve a user's friend's email address, so you won't be able to do that. It's trivial to retrieve a user's friend's birthdays provided they've given you the

FQL returns “Requires valid signature”

淺唱寂寞╮ 提交于 2019-12-02 08:13:02
I am having a wierd problem, things that worked before stopped working today, maybe it was bad before but now after the oAUTH 2 change, I am having troubles with a near production app this is what I try $params = array('method'=>'fql.query','query' => 'SELECT uid2 FROM friend WHERE uid1 = me()'); $result = $facebook->api($params); I get: Exception: 104: Requires valid signature or more elaborated : $config = array( 'appId' => 'XXXXXXXXXXXXXXXX', 'secret' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX', ); $facebook = new Facebook($config); $uid = $facebook->getUser(); if ($uid){ try { $access_t = $facebook-

How to get only friends with profile photos uploaded, and ignore those users with the default silhouette?

随声附和 提交于 2019-12-02 06:55:14
I cannot figure a way get friends only with profile photos. I could use multi-query to check whether every friend has a photo, but that would incur heavy traffic. Are there any alternatives? Although Gajus’ suggested query might work right now, it’ll break once Facebook changes the URL of the default picture on their CDN. (Might happen, might not happen.) So I’d suggest this for improvement: The profile_pic table has a field called is_silhouette , which is a boolean for whether the user has their own profile picture set or not. So to get only those of your friends, that have a profile picture

Documentation for CONTAINS() in FQL?

大兔子大兔子 提交于 2019-12-02 06:26:41
问题 There have recently been several questions posted on Facebook.SO using CONTAINS() in the WHERE clause. It seems to work like the Graph API search function, AND functions as an indexed field. All great things for the FQL developer. SELECT name, username, type FROM profile WHERE CONTAINS("Facebook") However, the only official mention of the CONTAINS function appears in the unified_thread documentation. It is mentioned in passing, as a way to search for text contained in a message. It also

How to get all events from a facebook Page

核能气质少年 提交于 2019-12-02 06:22:41
There are tons of StackOverflow answers about getting events from a facebook Page. They all list a FQL query and I'm sure they all work great; but since I'm new to this I have no clue as to what context these queries are executed and how to even get far enough to use these queries. Getting all events from a facebook Page should be pretty trivial. There should probably be a complete copy+paste solution in every language but I haven't been able to find it. Ideally, I would like a step-by-step solution that works in javascript or C#. This is pretty much what I want to do and I see no reason why

get facebook likes count in iphone-sdk

我是研究僧i 提交于 2019-12-02 04:29:36
I don't want to show Like button... I just want to get the Number of count that has been liked for particular link... Just Cont.. No like button No dialogue Nothing Just do a simple url request to the Graph API: http://graph.facebook.com/[FULL URL] Example: http://graph.facebook.com/http://www.stackoverflow.com Edit: (an example with "LIKES") http://graph.facebook.com/http://www.imdb.com/title/tt0117500/ Awesome, isn't it? Matt Browne Just wanted to mention that if your URL has any question marks or ampersands in it, you will need to use a different notation: http://graph.facebook.com/?id=