【发布时间】:2013-04-23 02:58:31
【问题描述】:
我的 FQL 返回 UID 的非法字符。这是我的 FQL。 select uid,books from user where uid in (select uid2 from friend where uid1=me())。我正在使用 PHP SDK,我得到像1.0000008018280E+14(介于两者之间的东西。)。在我总共 600 个联系人中,大约有 400 个显示这样的 UID。我尝试指向 facebook.com/1.0000008018280E+14,它返回 304 未找到页面错误。我使用的代码是
$fql_query_url = 'https://graph.facebook.com/'.'fql?q=select+uid,books+from+user+where+uid+in(select+uid2+from+friend+where+uid1=me())'.'&access_token='.$_GET['access'];
$fql_query_result = file_get_contents($fql_query_url);
$fql_query_obj = json_decode($fql_query_result, true)
// display results of fql query
echo '<pre>';
print_r($fql_query_obj);
echo '</pre>';
【问题讨论】:
-
请到developers.facebook.com/tools/explorer/…查看,看看能否重现id 1.0000008018280E+14。
-
我查了一下,没有问题。我还发现 UID 100000105975568 显示为 1.0000010597557E+14。我认为 PHP 正在四舍五入之类的。有人可以解释一下并提出可能的解决方法吗?
标签: facebook-graph-api facebook-javascript-sdk facebook-fql illegalstateexception