[英]when do facebook.request 2nd times, return OAuthException error code 2500
I try to get the album list from my facebook account, but there are more than 25 albums in my account, facebook only return 25 album when in each query. 我尝试从我的facebook帐户获取相册列表,但是我的帐户中有25个以上的相册,facebook在每次查询时仅返回25个相册。
first time I query the album first 25 albums list by normal use 第一次我按正常使用情况查询专辑的前25张专辑列表
facebook.request(me/albums);
and it returns album list successfully. 并成功返回相册列表。
I use following to query next 25 albums, it will return Error code 2500 我使用以下查询下25张专辑,它将返回错误代码2500
facebook.request(me/albums?after=.......);
getting respose is 得到休息是
response = {"error":{"message":"An active access token must be used to query information about the current user.","type":"OAuthException","code":2500}}
If I add the access token manually in my request strings, like this 如果我在请求字符串中手动添加访问令牌,就像这样
facebook.request(me/albums?after=.......&access_token=......);
It will return erro code 190 它将返回错误代码190
response = {"error":{"message":"Malformed access token ...............?access_token=...............","type":"OAuthException","code":190}}
Did I do something wrong? 我做错什么了吗?
I found that the it will get problems with Error code 2500 when using command facebook.request. 我发现使用命令facebook.request时它将出现错误代码2500的问题。
The same command is working fine when query in Graph API Explorer website, but won't work when code running. 在Graph API Explorer网站中查询时,相同的命令可以正常工作,但是在运行代码时则无法使用。
So finally I changed my way to get my album list. 所以最后我改变了获取专辑清单的方式。 using FQL Query, then this problem solved.
使用FQL查询,则此问题得以解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.