facebook-fql

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

戏子无情 提交于 2019-12-06 00:37:50
问题 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

Facebook ID integers being returned oddly

岁酱吖の 提交于 2019-12-06 00:36:39
I'm making FQL calls using the following url and then making a curl call. $url = 'https://api.facebook.com/method/fql.query?access_token='.$access_token.'&query='.rawurlencode($query).'&format=JSON'; and I then pass the returned data through a json_decode call I've got this query: SELECT name,page_id,page_url FROM page WHERE page_id IN (SELECT page_id FROM page_admin WHERE uid= $uid ) which returns a list of the names and pages for which the specified UID is an administrator. On some PHP installs (and I've not been able to narrow it down) the page_id is turned from a long integer into a

Cannot get page like for some users

自作多情 提交于 2019-12-05 23:38:26
I've developed a PHP app which just need to get if the user has liked a certain page. I login the user this way: $this->_facebook = new Facebook(array( 'appId' => "123", 'secret' => "346", )); $this->_facebookUser = $this->_facebook->getUser(); $this->_facebook->api('/me'); and then $checkIfUserLikePage = $this->_facebook->api(array( "method" => "fql.query", "query" => "select uid from page_fan where uid=me() and page_id=" . $pageid, )); This mostly works but for some users does not, it returns an empty array. I've checked online and my app is probably missing the *user_likes* permission. And

Check if a Facebook user likes a page using fql

依然范特西╮ 提交于 2019-12-05 21:38:16
I want to check whether the loggedIn user has liked a specified page or not. Below is my code. $fql_pageid = "SELECT url,site,id FROM object_url WHERE url IN('http://developers.facebook.com/')"; $api_pageid = $facebook->api(array( 'method' => 'fql.query', 'query' => $fql_pageid )); $pageid = $api_pageid[0]["id"]; //get id of the specified page $fql_like = 'SELECT object_id FROM like WHERE user_id=me()'; $api_like = $facebook->api(array( 'method' => 'fql.query', 'query' => $fql_like )); When I do var_dump($api_like) , there are only 6 records appearing. But I checked my Facebook account, there

Facebook app hosted on Google App Engine

懵懂的女人 提交于 2019-12-05 20:49:40
I am new to Facebook apps, I have an app already up and running on GAE (using python). I want to integrate it with Facebook so I can access some of the users' data to help me personalize the app (data like the liked pages, interests, where they are from etc..). And also to share the app's outputs to be seen by friends. I thought I would go for the Facebook app option on https://developers.facebook.com/ I don't know where to start from, there are some tutorials (most of them are very old, some use scripts that are deprecated so it is a bit worrying), and there's FBML.. and I was thinking that

How to retrieve ALL Facebook photos a person is tagged in

巧了我就是萌 提交于 2019-12-05 19:15:59
I know you can append limit and offset values to the graph.facebook.com/id/photos API call to paginate through photos. But large limits don't seem to work well, photos end up missing. I read here that limit=0 gives you all photos, but again photos will be missing. So what's the biggest limit you can use reliably? What's the proper way to efficiently retrieve ALL photos? Is there documentation on the limits of limit? Here's my experience with the Facebook API... If you set a limit, you won't get any more than that. However, a large limit will most certainly give you less than you requested

FQL Query to get Facebook Friends Birthdays in next 30 days using Android

ぐ巨炮叔叔 提交于 2019-12-05 18:36:16
I am writing Android Application, in which i am fetching list of friends those birthdays in current month by using below code: Calendar c = Calendar.getInstance(); int month = c.get(Calendar.MONTH) + 1; String query = "select name, birthday, uid, pic_square from user where (substr(birthday_date, 0, 2) =" + month +") AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) order by birthday_date ASC"; but now i want to fetch list of facebook friends those birthdays in next 30 days , i know the java code to get next 30 days by using current date like below: Date today = new Date(); Calendar cal =

Retrieving posts and comments from a Facebook page

℡╲_俬逩灬. 提交于 2019-12-05 16:32:09
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, actor_id, target_id, likes, message from stream where source_id = '.$pages["stackoverflow"].'", "comments":

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

孤街醉人 提交于 2019-12-05 08:40:15
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 message/note attached with the photos for the post", "id": "xxxxxxxx_xxxxxxxxxx" "object_id":

How to get message thread URL knowing the thread id?

房东的猫 提交于 2019-12-05 08:38:33
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/messages/?action=read&tid=27726d81656e4c07ae5654116cccb724 where the previous rule doesn't work. Is there