Facebook API-fql_query,无效会话 [英] Facebook API - fql_query, Invalid session
问题描述
我正在尝试使用PHP库查询Facebook,而我所读的内容不需要会话密钥,或者我的情况下不需要会话密钥,但是下面的代码给我以下错误:会话密钥无效或不再有效".
I'm trying to query Facebook with the PHP Library and what I've read it shouldn't required a session key, or rather it shouldn't require one for my case, but my code below gives me the following error: "Session key invalid or no longer valid".
http://wiki.developers.facebook.com/index.php /Fql.query 例如,查询用户表就像在没有会话密钥的情况下调用users.getInfo一样-您只能在几个字段上进行查询."
http://wiki.developers.facebook.com/index.php/Fql.query "For example, querying the user table is like calling users.getInfo without a session key -- you can query only on a few fields."
$fb = new Facebook(FACEBOOK_KEY, FACEBOOK_SECRET);
$query = "SELECT uid,
name,
sex,
pic_square,
profile_url
FROM user WHERE name = 'some name' OR username = 'some name'";
$result = $fb->api_client->fql_query($query);
有什么想法吗?
/谢谢
推荐答案
我认为政策已更改,没有会话就无法查询用户表.
您可以尝试查询standard_user_info表.认为它不需要会话.
I think that policy has changed and you cannot query user table without session.
You can try to query standard_user_info table. Think it doesn't need session.
这篇关于Facebook API-fql_query,无效会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!