I've used this exact code and others that work to a certain degree, but I keep getting the following error:
{"error":{"type":"OAuthException","message":"An active access token must be used to query information about the current user."}}
Here is the code: I've used the access_token I get back and validated it against plugging it into my browser and it works great. But this code seems to either not be using the access token I get back, or I'm not setting it. I've even tried the FB.setAccessToken() method as well as params.putString("access_token", MY_ACCESS_TOKEN).
I'm wondering, since I did not need to change the access token for the website url to work, I would not think that I don't need to do anything special to the access_token like ecoding it like in a url?
Thanks for your help. I've scoured the net for answers for hours and there seems to not be any.
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());
Did you try to include the below code?
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
mFacebook.authorizeCallback(requestCode, resultCode, data);
}
According to the documentation, this must be included or the authentication will not function properly, which in turn could cause the error you're encountering. I had the same problem but then realized I was missing this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With