English 中文(简体)
如何做。 采用面纱的多频率
原标题:how to do fql.multiquery using facebook php sdk 3.0

从2.xPHP SDK向3.x迁移过程中的Im。 所有多频率电话都被打断,我没有能够说明如何解决。

脸谱仪利用 o木字作品连接标识,使现有用户的数据能够进入服务器。 我认为,我获得象征性的帮助是正当的。

我尝试了以下编码改动,每次都出现错误:

www.un.org/Depts/DGACM/index_spanish.htm 旧方式:

        $id = $fb->getUser(); // RETURNS A VALID USER ID
        $fql =  { "friends" : "SELECT uid FROM user WHERE has_added_app=1 and uid IN (SELECT uid2 FROM friend WHERE uid1 =  .$id. )", "profiles" : "SELECT uid, name, pic_square FROM user WHERE uid IN (SELECT uid FROM #friends)"} ;

        $response = $fb->api( array( method  =>  fql.multiquery , queries  => $fql));


Gives the error: PHP Fatal error: Uncaught Exception: 102: Requires user session thrown

<>载体>假定采用新方式:

        $id = $fb->getUser(); // RETURNS A VALID USER ID
        $fql =  { "friends" : "SELECT uid FROM user WHERE has_added_app=1 and uid IN (SELECT uid2 FROM friend WHERE uid1 =  .$id. )", "profiles" : "SELECT uid, name, pic_square FROM user WHERE uid IN (SELECT uid FROM #friends)"} ;

        $response = $fb->api( array( method  =>  fql.query , query  => $fql));

Gives the error: PHP Fatal error: Uncaught Exception: 601: Parser error: unexpected { at position 0

任何帮助了解如何利用新的PHP SDK进行多频率的工作都受到赞赏。

问题回答

仅通过询问作为联系阵列:

  $common_fields_fql =  SELECT uid, email, contact_email, first_name, last_name, birthday_date, pic_square, sex, hometown_location, current_location, is_app_user FROM user WHERE uid  ;
  $fql = array(
     friends  =>  SELECT uid2 FROM friend WHERE uid1 = me() ,
     friends_details  => $common_fields_fql .  IN (SELECT uid2 FROM #friends) ,
     me  => $common_fields_fql .  = me() ,
     family  =>  SELECT uid, birthday, name, relationship FROM family WHERE profile_id = me() ,
  );
  $details = $facebook->api(array(
     method    =>  fql.multiquery ,
     queries   => $fql,
  ));




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签