facebook-fql

Retrieving posts and comments from a Facebook page

守給你的承諾、 提交于 2019-12-07 07:02:23
问题 I want to retrieve all of the posts from a given facebook page along with the associated comments. I wrote this code (app details obfuscated, replace with your own in order to run it). <?php require_once('facebook.php'); $facebook = new Facebook(array( 'appId' => 'MY_APP_ID', 'secret' => 'MY_APP_SECRET', 'cookie' => true, )); $pages = array( "stackoverflow" => 11239244970 ); $result = $facebook->api(array( 'method' => 'fql.multiquery', 'queries' => '{ "posts": "select post_id, source_id,

How to get message thread URL knowing the thread id?

穿精又带淫゛_ 提交于 2019-12-07 06:05:54
问题 There is How can I construct a link to view a message on facebook.com if I have the message id question, but it is unanswered. What if I got the id of the thread using /me/inbox API endpoint and need to redirect user to the Facebook itself showing this thread? How do I construct the URL. There seem to be URLs like http://www.facebook.com/messages/?action=read&tid=id.143666952390138 where thread id is the number in the end. But there are also some stranger URLs like http://www.facebook.com

Getting all photos included in a single facebook feed post with either Graph API or FQL?

爱⌒轻易说出口 提交于 2019-12-07 05:31:57
问题 I'm using the Facebook graph API to get my recent posts and feed items with "graph.facebook.com/me/feed". The problem I am having is when a feed object is a post with multiple photos, the data in the results only contains info for one of the photos, and I cant seem to find a way to get the other photos included in the post. Some details from the feed object: "type": "photo" "status_type": "mobile_status_update" "picture": "http://the_url_to_the_one_photo_it_does_return.jpg" "message": "The

SSL Connection timeout in facebook fql

我与影子孤独终老i 提交于 2019-12-07 03:54:23
问题 I am using facebook api to get backup of the facebook photos using access_token and fql. Using fql I got the list of albums of the user $client = new Facebook(array('appId' => 'xxxx', 'secret' => 'xxxxxx')); $fql_albums = "SELECT aid,name from album where owner=$user_Id"; $albumId = $client->api(array( 'method' => 'fql.query', 'access_token' => $user_access_token, 'query' => $fql_albums, )); After getting this list I run a query to get all the photos in the album and then download that album

How to filter by category in FQL

五迷三道 提交于 2019-12-07 02:05:37
问题 As you can see here, Businesses have their category information: Local Business, Sport, Education.. etc. It is the field "category". I would like to know, is there a way to filter businesses by their category and position with FQL? I haven't found how to do it. For instance: give me all the sports center in this circle (lat, lon, radius). thanks 回答1: I have been looking for something and haven't found anything. It appears that only the graph api has the category information for a page. 回答2:

Facebook - max number of parameters in “IN” clause?

╄→гoц情女王★ 提交于 2019-12-06 20:57:01
问题 In Facebook query language(FQL) , you can specify an IN clause, like: SELECT uid1, uid2 FROM friend WHERE uid1 IN (1000, 1001, 1002) Does anyone know what's the maximum number of parameters you can pass into IN ? 回答1: I think the maximum result set size is 5000 回答2: It may seem like an odd number (so perhaps I miss counted, but it's close ~1), but I can not seem to query more than 73 IN items. This is my query: SELECT object_id, metric, value FROM insights WHERE object_id IN ( ~73 PAGE IDS

How to get email from facebook

匆匆过客 提交于 2019-12-06 16:29:41
I have created an application. There is form, in which there are two fields email and name. There is button, which enable you to login with facebook and after that it will get the user name and email. I have tried many ways. I can get name and other detail, but I couldn't get user email. I have also used fql to get the email but didn't get. Below is the code. I want to retrive that by PHP. $fql = 'SELECT contact_email FROM user WHERE uid = '.$user; $res = $facebook->api(array('method' => 'fql.query', 'query' => $fql)); Can any one will tell me how to get the email. Any help will be appreciable

FQL for returning all album names and object id's of the albums for ALL friends of a user

不问归期 提交于 2019-12-06 16:14:57
looking for fql query to grab all albums of all friends, extra points for complete js example using FB.Data.query and jQuery to spit out results as they come in. thanks!! You need the friends_photos permission and then use: Javascrip: $("#friends-albums").click(function() { FB.api( { method: 'fql.query', query: 'SELECT aid,owner,name FROM album WHERE owner IN (SELECT uid2 FROM friend WHERE uid1 = me()) LIMIT 25' }, function(resp) { $.each(resp, function(k,v) { console.log(v.name) }) } ); }); HTML: <button id="friends-albums">Get Albums</button> Note: I'm using jQuery To get the full list,

Get permissions for a Facebook Event's Wall

筅森魡賤 提交于 2019-12-06 16:13:34
I'm integrating Facebook Event walls on my site using the JS API. Some events have "open" Walls (in that any logged-in user can post to them), some have Walls that will only accept posts after a user RSVPs, and others have their Wall turned off completely. Is there a way to determine which is the current setting so I can hide the comment box when appropriate? The documentation does not seem to suggest I can: http://developers.facebook.com/docs/reference/api/event/ Indeed it dose, if you open link in documentation, a example of graph call, you get this json which cointains privacy inforamtion:

FQL NOT IN Equivalent operator like <> , EXCEPT, !=

孤街浪徒 提交于 2019-12-06 16:07:15
I'm trying to develop this code: $users = $facebook->api(array( 'method' => 'fql.query', 'query' => "SELECT uid, last_name, pic_big" + " FROM user WHERE uid IN (" + " SELECT uid" + " FROM page_fan" + " WHERE page_id='411133928921438'" + " AND uid IN (" + " SELECT uid2 FROM friend WHERE uid1 = me()" + " )" + ")" )); The idea is that i don't want to use the operator IN but NOT IN, but FQL doesn't support operators like NOT IN, EXCEPT... How can i do it with FQL?... Raul Rene There is no NOT IN operator in FQL. You could do a simple select using IN and use PHP for negation. It's a little overhead