facebook-fql

PHP Facebook FQL: Making queries in the new SDK

送分小仙女□ 提交于 2019-12-22 00:18:33
问题 New to PHP and Graph API. It seems that in the old API you could create a facebook object and pass in a standard query (select blah in blank where x = y ...) but now I don't see how to do that. All of the examples in the facebook documentation have you using a get_file_contents for graph.facebook.com/?fql etc. I've been trying to use that but it seems inefficient for complex queries. Help? I'm kinda confused and don't understand some of the facebook documentation. Thanks. 回答1: Using the PHP

FQL query through category_list

六月ゝ 毕业季﹏ 提交于 2019-12-22 00:06:07
问题 I've built the following FQL query but I'm facing problems to add a filter. SELECT about, attire, categories, checkins, company_overview, culinary_team, description, fan_count, food_styles, founded, general_info, general_manager, hours, keywords, location, mission, name, page_id, page_url, parent_page, parking, payment_options, phone, price_range, products, public_transit, restaurant_services, restaurant_specialties, talking_about_count, TYPE, username, website, were_here_count, pic FROM page

Facebook API: How to get count of group members

拟墨画扇 提交于 2019-12-21 20:54:14
问题 Im working on fb app using PHP client and FQL.Looks like that fb api doesnt support this. You can get max random 500 members with FQL. But when group has more than 500 members there is no way how to get total count of members. I need only number dont care about member details. Anyone can help me please? 回答1: You can use the summary parameter which will return a total_count value. /v2.11/{GROUP_ID}?fields=members.limit(0).summary(true) It also works when searching for groups: /v2.11/search?q

Starting multiquery in client throws parser error

做~自己de王妃 提交于 2019-12-21 06:56:04
问题 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

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

不打扰是莪最后的温柔 提交于 2019-12-21 06:34:53
问题 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

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

∥☆過路亽.° 提交于 2019-12-21 06:16:47
问题 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? 回答1: Sure, you can do this using FQL: SELECT post

Facebook iFrame app - how to fetch Preload FQL result using PHP SDK?

孤街浪徒 提交于 2019-12-21 05:15:20
问题 since few years I have an FBML app (a small Flash game) which I'm now trying to convert to an iFrame app. Unfortunately there aren't many docs for Facebook iFrame apps yet. For my game I need the user's first name, picture, gender and the city. In my old version I had this preload FQL (created once by a PHP script): $fql = array('info' => array('pattern' => 'facebook', 'query' => 'SELECT first_name, sex, pic_big, current_location FROM user WHERE uid={*user*}')); $fb->api_client->admin

How can I run an fql request in the background? (asynchronous api calls via php)

谁都会走 提交于 2019-12-21 02:47:07
问题 I'd like to run a particularly expensive fql query in the background, log results to the database, and retrieve it later without the user having to wait for each step. Can you share an example of how to run a facebook request asynchronously? main.php $uid = $facebook->getUser(); if ($uid) { try { echo $user; //////////////////////////////////////////////////////// // Run lengthy query here, asynchronously (async.php) // //////////////////////////////////////////////////////// // // // For

How can I run an fql request in the background? (asynchronous api calls via php)

拈花ヽ惹草 提交于 2019-12-21 02:47:03
问题 I'd like to run a particularly expensive fql query in the background, log results to the database, and retrieve it later without the user having to wait for each step. Can you share an example of how to run a facebook request asynchronously? main.php $uid = $facebook->getUser(); if ($uid) { try { echo $user; //////////////////////////////////////////////////////// // Run lengthy query here, asynchronously (async.php) // //////////////////////////////////////////////////////// // // // For

New FQL Multiquery in Graph API Javascript Example?

…衆ロ難τιáo~ 提交于 2019-12-21 02:38:38
问题 Anyone had luck with doing multiquery through javascript API or ajax? 回答1: I have successfully done this, although I had a bit of trouble at first with the documentation only having a php example. Just make sure you are attaching the queries json as the 2nd parameter in the api call rather than as a query string like in the php sample. That is: FB.api('/fql', {q:{"query1":"SELECT uid, rsvp_status FROM event_member WHERE eid=12345678","query2":"SELECT name, url, pic FROM profile WHERE id IN