最近Facebook API的FQLQuery [英] FQLQuery for recent Facebook API

查看:93
本文介绍了最近Facebook API的FQLQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了最新的Facebook SDK for PHP。当我想要获取有关帖子的信息时,如同样的计数,评论数和分享次数,我的查询工作没有任何问题。



但是,当我想要一个用户的朋友计数不起作用,告诉我



Facebook\FacebookAuthorizationException:(#12)版本v2不推荐使用fql。 1和更高版本



嗯,我没有真正使用FQL-API。我使用的是图形API,我正在做一个fql作为参数。像这样



https://graph.facebook.com/v2.0/fql?q=SELECT+friend_count+FROM+user+WHERE + uid +%3D + 100004262439666& access_token =%ACCESS_TOKEN%



当我将这个地址粘贴到我的搜索栏时,它没有问题。朋友数也是一样。但是,当我通过Facebook PHP SDK完全相同的查询时,我得到以上异常。



我有多种方法使用Graph API来进行FQL请求。在FB消息中,它表示它确实已经不推荐了,但为什么某些方法仍然可以工作,有些则不行?



我不能得到朋友的数量和发布信息,如评论,并从用户或Facebook页面计数?



当我读取唯一的方法来获得一个朋友的数量是通过fql查询,所以...是啊...



任何更多的信息这个?

解决方案

Facebook Platform API 2.0版是最新版本的FQL可用。 2.0之后的版本将不支持FQL。请将您的应用程序迁移到使用Graph API而不是FQL。



但是,直到2016年8月7日,v2.0可用,Graph API尚不适合所有用途。因此,您可以继续使用FQL,但需要下载Facebook 3.16 < a href =https://developers.facebook.com/docs/android/downloads =nofollow> https://developers.facebook.com/docs/android/downloads


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_TOKEN%

When I paste this address into my searchbar it works without problems. Same goes for the friend count. However, when I'm doing the exact same query via the Facebook PHP SDK I get above exception.

I have multiple methods using the Graph API to make FQL-Requests. In a FB news it states that it is indeed deprecated, but why do some methods still work and some don't?

Won't I be able to get friend count and post information like the comment and like count from a user or facebook page?

As I read the only way to get a friend count is via the fql query, so... yeah...

Any more info on this?

解决方案

Version 2.0 of the Facebook Platform API is the last version where FQL will be available. Versions after 2.0 will not support FQL. Please migrate your applications to use Graph API instead of FQL.

But v2.0 is available until August 7th 2016, the Graph API is not yet suitable for all usages.So you can continue using FQL but need to download Facebook 3.16 https://developers.facebook.com/docs/android/downloads

这篇关于最近Facebook API的FQLQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆