简体   繁体   English

通过获取网址使用FQL查询Facebook图

[英]Query Facebook Graph using FQL by fetching a url

I'm currently trying to us FQL to find the networks of registered users. 我目前正在尝试通过FQL查找注册用户的网络。

According to the documentation, the url fetched should be something along the lines of: 根据文档,获取的URL应该类似于以下内容:

https://api.facebook.com/method/fql.query?query=SELECT affiliations FROM standard_user_info WHERE uid=me()&access_token=tokengoeshere&application_secret=appsecretgoeshere https://api.facebook.com/method/fql.query?query=从standard_user_info中选择从属关系uid = me()&access_token = tokengoeshere&application_secret = appsecretgoes此处

However, when querying I get Error code 15: The method you are calling must be called with an app secret signed session. 但是,查询时出现错误代码15:必须使用应用程序秘密签名的会话来调用您正在调用的方法。

Does anyone know how to fix this? 有谁知道如何解决这一问题?

Thanks. 谢谢。

I execute this query by passing my app's access_token (not an access token that associates me with a certain user) and without the app_secret. 我通过传递应用程序的access_token(而不是将我与某个用户关联的访问令牌)来执行此查询,并且没有app_secret。 I get an empty set in response but no error. 我得到一个空集作为响应,但没有错误。

Also (just making sure) you will obviously need to URL-escape the query. 同样(只需确保),您显然需要对查询进行URL转义。

This usually works 这通常有效

var facebookURL = 'https://api.facebook.com/method/fql.query?query='

var query = 'SELECT bla FROM bla'

var accessToken = 'your access token'

var appToken = '&access_token='+accessToken+'&callback=?'

var url = facebookURL + query + appToken;

查询user表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM