douyao3895 2015-01-29 19:14
浏览 27
已采纳

用户名不是用户表facebook api的成员

For last few years I was using FQL of Facebook in which i gathered data about last comments by fans on one of my pages. To do that I was forced to use 2 tables joins. I could do that with fql.multiquery help.

Small code of this:

$query1 = "SELECT source_id, post_id, created_time , actor_id, target_id, message FROM stream WHERE source_id = ".$page_id." AND actor_id != ".$page_id." 
ORDER BY created_time DESC
LIMIT 3";        
$query2 = "SELECT username, uid, first_name, last_name FROM user WHERE uid in (SELECT actor_id FROM #query1)";

$multiQuery = array
(
   "query1" => $query1,
   "query2" => $query2,
);

$param = array(       
   'method' => 'fql.multiquery',       
   'queries' => $multiQuery,       
   'callback' => '');       
$queryresults = $facebook->api($param);

Today i got the error "username is not a member of the user table Facebook API".

  • I have searched for Facebook user table fields ( maybe they have changed ).
  • Tried 'SELECT *' - other error ( not allowed )

On Facebook i have found that soon ( in April ), API 2.0 will be shut down. And 2.1 FQL is deprecated.

I want to fix this in easy way.

Any information will be helpful.

  • 写回答

3条回答 默认 最新

  • douwu5009 2015-01-29 20:24
    关注

    It's correct that the username field is deprecated with the use of the Graph API v2.0 and higher. I'd recommend to use the uid field instead.

    The problems are that you're using the wrong endpoint with your FQL query. fql.multiquery resolves to the old REST API, which will be deprecated on April 30th, 2015.

    The regular "new" FQL endpoint in the Graph API is /fql?q={query}, and you can use the Batch API to trigger multiple requests at once. If you've got a v2.0 app, you can use FQL until August 7th, 2016.

    See

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题