Hello friends i need to get user information from facebook i am using code
String about_me=facebook.request(“me”);
but this is showing error :—
{“error”:{“message”:”An active access token must be used to query information about the current user.”,”type”:”OAuthException”,”code”:2500}}
can any body tell me how to resolve this ????
that error means that your Facebook object does not have a valid access token. try something like this to see what your access token and its associated expiration time is.
it is your job to check whether you (the user) has an access token and if it is still valid. if not then you must open up the dialog to proceed with authentication.
the newer android facebook API is supposed to work with single sign on (SSO). meaning, if a user already has “THE” official facebook app installed and is logged into that official app on the device, then the user does not have to re-authenticate.
otherwise, an (ugly) dialog shows up where the user has to enter in their credentials (which is just a web browser embedded in the dialog).