English 中文(简体)
利用图形FQL
原标题:Get latitude/longitude of friend s current_location using Graph FQL

我试图利用单一的APIC电话,让所有用户朋友的纬度/长度。 我认为,我需要撰写一份多克信用证声明,但我可以纠正。

我认为,这两个问题需要如下:

 "friends":"SELECT uid,current_location FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())" 

 "location":"SELECT location FROM page WHERE id IN (SELECT current_location_id FROM #friends)" ;

我的问题是,在第一个问询中,我需要获得目前所在地点的识别资料,以便我在第二个问询中能够参考这一信息,但我只知道如何找到一个包含这种id的阵列。

感谢任何帮助!

<>扩大:

我不想让朋友看到。 相反,我想在地球地图上描绘所有用户朋友的“目前——所在地”(即他们居住的地方)。 我可以找到一个用户的“当前——地点”和以下FQL问题:

"SELECT uid,sex,current_location FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())"

回答如下:

[current_location] => Array
            (
                [city] => New York
                [state] => New York
                [country] => United States
                [zip] => 
                [id] => 108424279189115
                [name] => New York, New York
            )

(如上所示,纽约)

因此,我现在需要掌握当前地点(例如1084279189115)的识别资料,并处理第二个联邦调查组问题,例如:

"SELECT location,name FROM page WHERE page_id = 108424279189115)"

获取目前地点的自由度和长度。 目前,我有一部操作FQL查询的第一部工作法典,然后在php上抽取页号,然后用第二个FQL查询,以获得目前——地点/长度。 然而,出于业绩原因,如果可能的话,我只想花一个多频率。

问题回答

Edit:

查询应通过调整第二点工作:

 "location":"SELECT location FROM page WHERE id IN (SELECT current_location.id FROM #friends)" ;

当在快乐团中与阵列一道工作时,你可以通过穿透阵列获得任何询问的价值。 价值

而且,如果你需要的是那页的id,那么你或许会通过当场改善业绩。 参看你第一次询问


你们会想使用一种 f。 多频率,这里有一个可满足您需求的模拟答案:。 书目图

The FQL documentation on multiquery is found here: http://developers.facebook.com/docs/fer/fql/

另外,你还试图获得一只 object子/一只 object子? 如果需要,请查看这一资源:http://developers.facebook.com/docs/fer/fql/checkin/

Edit:

我不敢肯定,你正在努力做些什么。 我只看一看一皮,并测试了一些询问,你从朋友那里获得临时/长期服务的唯一途径似乎是根据检查,如果有必要,你可以从那里获得详细情况。 即便看你的第二个询问,现在的“所在地点”在页面桌旁的任何地方都没有提及,从页面桌上挑选地点将给你点,使其与地点有关。 也许你可以进一步阐述你重新努力取得的成就。

Here is a multiquery statement I wrote in PHP using FQL (it will select the coordinates of all your friends check ins, then from there get details on the place of the checkin pertaining to that friend):

try{
    $multiQuery = "{
         query1 : SELECT coords, tagged_uids, page_id FROM checkin WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) ,
         query2 : SELECT name, description FROM page WHERE page_id IN (SELECT page_id FROM #query1) 
    }";

    $param = array(       
          method  =>  fql.multiquery ,       
          queries  => $multiQuery,       
          callback  =>   
    );       
    $queryresults = $facebook->api($param);
        print_r($queryresults);
    }
catch(Exception $o){
    print_r($o);
}
fql?q=SELECT location,name FROM page WHERE page_id in (SELECT current_location.id from user where uid in(select uid2 from friend where uid1=me()))

这将为你们带来魔 the。

facebook.batch_fql({
     query1 : "SELECT uid, name, current_location.id FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me())",
     query2 : "SELECT page_id, name, description, location FROM page WHERE page_id IN (SELECT current_location.id FROM #query1)"
})

将回复2份答复

一份名单将列出朋友统一名单、姓名及其现有地点。

另一份是一份列有其名称、说明和地籍信息的独特地点识别清单。

EDIT:如果你问一下目前使用FQL的地点,你就会在第一次答复中满排,你甚至不需要第二次答复。





相关问题
Facebook Connect login dialog not working

I am using Facebook Connect for iPhone and following the official instructions. I use the following code to display the login dialog: FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:...

Facebook App Profile Tab is Empty ... No Content Displayed?

I can view my application via the http://apps.facebook.com/myapplication/ link and the content shows up correctly. I also added the application as a tab to a facebook page. However, when viewing the ...

Facebook Platform error: "Object cannot be liked"

I m working on a Facebook Application that generates wall posts. In testing these posts, I ve discovered that the Facebook Platform action of "liking" a post is failing. The specific error message ...

how to call showPermissionsDialog() in php (facebook api)?

I was reading over the documentation yet I could not figure out how to call Facebook.showPermissionsDialog() in php include_once ./facebook-platform/php/facebook.php ; $facebook = new Facebook(my ...

Facebook connect

If I plug in the facebook connect into my website, How can I prevent double signups? Lets say I have a user that s already signed up to my site but he clicked the connect with facebook, is there a ...

热门标签