Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get access token; Unknown path components: /access_token, (works in graph API explorer,)

Code from Graph API Explorer

accesstoken = AccessToken.getCurrentAccessToken();

However I am confused , I am requesting for accesstoken. still i should accesstoken as a field?

How do I get a accesstoken. I do not intend to fb login a user to get a session via login.

I just want to get a page posts and display them.

If i use accesstoken = AccessToken.getCurrentAccessToken(); I get response as Unknown path components: /access_token,

like image 258
Dhinakaran Thennarasu Avatar asked Feb 17 '26 03:02

Dhinakaran Thennarasu


1 Answers

I would need to see your code. To access any sort of data, you would need to login and get an access token from Facebook since all the information received through the Graph API is based on the user profile and preferences. Have you configured your app by doing the following things?

  1. Create an app id on Facebook
  2. Generate a hash key
  3. Add the hash key to your app here
  4. Configure the custom Application class to include Facebook SDK initialisation code.
  5. Add the meta data to your AndroidManifest.xml containing your app id.
  6. Setup the CallbackManager and FacebookCallback with the LoginManager to perform the actual login. All the steps mentioned above are covered in full detail here Let me know how it goes
like image 98
PirateApp Avatar answered Feb 19 '26 11:02

PirateApp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!