facebook-fql

How can I get all photos in one post using Graph API?

喜夏-厌秋 提交于 2019-12-02 23:21:23
{ "id": "11882030_4952296803730", "from": { "name": "xxx", "id": "11882030" }, "message": "test", "picture": "https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash4/408410_4952294483672_298434229_s.jpg", "link": "https://www.facebook.com/photo.php?fbid=4952294483672&set=pcb.4952296803730&type=1&relevant_count=2", "icon": "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yx/r/og8V99JVf8G.gif", "actions": [ { "name": "Comment", "link": "https://www.facebook.com/11882030/posts/4952296803730" }, { "name": "Like", "link": "https://www.facebook.com/11882030/posts/4952296803730" } ], "privacy": {

Facebook — best way to do FQL “join” with event and event_member?

牧云@^-^@ 提交于 2019-12-02 23:07:55
In a Facebook app I need to get a user's events for a date range and his rsvp status for each event. I can get the user's events fine, but at the moment I'm looking up the rsvp status for each event one at a time, and the app is timing out for people with a large number of events. I'm getting the user's events this way: $fql = "SELECT eid, name, start_time, end_time FROM event WHERE eid IN (SELECT eid FROM event_member WHERE uid = $user) AND start_time > '$timestamp' ORDER BY start_time"; This part is working fine. And here's how I'm getting the rsvp status for each event, one at a time: $fql

FQLQuery for recent Facebook API

微笑、不失礼 提交于 2019-12-02 19:45:39
问题 I downloaded the most recent Facebook SDK for PHP. When I want to get information about a post, like the like count, comment count and share count my query works without any problems. However, when I want to get the friend count of a user it doesn't work and tells me Facebook\FacebookAuthorizationException: (#12) fql is deprecated for versions v2.1 and higher Well, I'm not really using the FQL-API. I'm using the graph api and am doing a fql as a parameter there. Like this https://graph

How to get large photo URL in one API call?

匆匆过客 提交于 2019-12-02 18:47:17
I want to display large photos in my Facebook app's feed view immediately. Is it possible to get the large photo src URL from a stream/feed using one API call? The photo id is returned in the stream/feed and one can of course then supply this photo id in an additional FQL or graph API call to retrieve all the information about that photo. However, is there a way using multi-query or batch calls to get a larger photo src url using one API roundtrip? I haven't tried this with stream/feed photos, but the generally accepted way of doing this is: http://graph.facebook.com/{ID of object}/picture If

Graph API - Get events by owner/creator

半城伤御伤魂 提交于 2019-12-02 18:26:19
Is there a way with the Facebook Graph API to get a list of all events created by a single profile? Our client creates a bunch of events and we want to pull a list of them all. I said that they would just have to make sure they set themselves to be attending the event, because then I can easily pull the list of events that profileId is attending, but I'm curious if there's another way. Maybe an FQL query? They look to require a query on the primary key though. And what would that FQL query look like if that's the way to do it?? zechdc I basically used the FQL that @jhchen provided. However, it

Unexpected behavior when using FQL

与世无争的帅哥 提交于 2019-12-02 17:32:11
问题 Adding the LIMIT option to an FQL causes MORE results to return than without the LIMIT. For an example: SELECT post_id, actor_id, message,description,type FROM stream WHERE source_id = me() returns 4 results: { "data": [ { "post_id": "1458319848_4164228991531", "actor_id": 1458319848, "message": "Oh happy days!", "description": null, "type": 46 }, { "post_id": "1458319848_4081409841104", "actor_id": 1458319848, "message": "", "description": "Caroline Natan and Or Karlinsky are now friends.",

In Facebook graph API how to find which all of your friends like a particular book or movie

别等时光非礼了梦想. 提交于 2019-12-02 16:01:29
I'm trying to figure out how to find how many of my friends like a particular entity. For example, for a given book or movie, how can I look up how many of my friends have already liked the same book or movie. I believe that information does appear when we display the fb:like button social plugin but I want to get that count so I can programatically display the most popular books among my friends etc is descending order. My backend is php but I'm also using Javascript SDK. Thanks for your inputs in advance These "objects" are actually pages, so to retrieve your friends list that like a movie

How can I execute a FQL query with Facebook Graph API

 ̄綄美尐妖づ 提交于 2019-12-02 14:06:56
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/ 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 response } ); This assumes you've already setup your page according to the Facebook guidelines as shown here - http

Get facebook user if only logged in facebook php sdk

▼魔方 西西 提交于 2019-12-02 09:56:18
I want to get current loggedin facebook user in php sdk. Here is what i have tried: $facebook = new \Facebook(array( 'appId' => 'XXXXXXXXXXX', 'secret' => 'XXXXXXXXXXXXXXXXXXXXX', )); $user = $facebook->getUser(); var_dump($user); if ($user) { $logoutUrl = $facebook->getLogoutUrl(); echo $logoutUrl; } else { $loginUrl = $facebook->getLoginUrl(); echo $loginUrl; } When I load the page with above code, I get the loginUrl even though I am logged in facebook. Only when i load $loginUrl in the browser, I am able to get facebook user. How do I get the current user at first load of this page? I get

FQLQuery for recent Facebook API

删除回忆录丶 提交于 2019-12-02 09:52:22
I downloaded the most recent Facebook SDK for PHP. When I want to get information about a post, like the like count, comment count and share count my query works without any problems. However, when I want to get the friend count of a user it doesn't work and tells me Facebook\FacebookAuthorizationException: (#12) fql is deprecated for versions v2.1 and higher Well, I'm not really using the FQL-API. I'm using the graph api and am doing a fql as a parameter there. Like this https://graph.facebook.com/v2.0/fql?q=SELECT+friend_count+FROM+user+WHERE+uid+%3D+100004262439666&access_token=%ACCESS