Android - OAuthException - 我一直得到:"必须使用活动访问令牌来查询有关当前用户的信息"

Max*_*x57 6 android access-token

我已经使用了这个确切的代码和其他在某种程度上工作的代码,但我不断收到以下错误:

{"error":{"type":"OAuthException","message":"An active access token must be used to query information about the current user."}}
Run Code Online (Sandbox Code Playgroud)

这是代码:我使用了access_token我回来并验证它反对将其插入我的浏览器,它运行良好.但是这段代码似乎没有使用我得到的访问令牌,或者我没有设置它.我甚至尝试过FB.setAccessToken()方法以及params.putString("access_token",MY_ACCESS_TOKEN).

我想知道,因为我不需要更改网站网址的访问令牌才能工作,我不认为我不需要对access_token做任何特别的事情就像在网址中那样对其进行编码?

谢谢你的帮助.我已经在网上搜索了几个小时的答案,似乎没有任何答案.

Bundle params = new Bundle();

params.putString("message", "Test");
params.putString("name", "American Virgin");
params.putString("link", "http://bit.ly/12345");
params.putString("description", "A Freshman College Girl on a scholarship from an ...");
params.putString("picture", "http://xxx/MOV1026.jpg");

mAsyncRunner.request("me/feed", params, "POST", new TestRequestListener());
Run Code Online (Sandbox Code Playgroud)

max*_*nna 1

您收到的访问令牌需要进行 URL 解码。
URLDecoder.decode()用过MultiPartEntity(HttpMultipartMode.STRICT);