• Register
1 vote
91 views

Problem :

I am very new to Facebook programming. Currently I want to run a very simple code for Facebook connect which I have already written but now a days I often face below error message :
[error] => Array

            (

                [message] => An active access token must be used to query information about the current user.

                [type] => OAuthException

                [code] => 2500

            )
I want expert help here to fix above error as I have already wasted couple of days in debugging above error but no successes yet.
8 5 2
3,230 points

Please log in or register to answer this question.

1 Answer

1 vote

Solution :

To fix above error you need to make sure that your access token is currently active. Also please make sure you are in logged in condition. After this please try to clean the cookies and also your cache from your browser by using ctrl+shift+del.

If even after doing above steps you are still facing the error then in that case you must check if you are getting 0 as the user id in return from your $facebook->getUser().Then you must also check your getAccessTokenFromCode() from the base_facebook.php and after that you must verify your access_token_response format as there is the possibility of it may be in JSON format.

So you must try to use very appropriate decoding method to get your $response_params['access_token'] from $access_token_response.

It will certainly help you.

8 4 1
5,680 points

Related questions

0 votes
1 answer 585 views
585 views
Problem : I am struggling to find out what is actually happening with my code. My scripts were working fine for some time and suddenly they have half stopped. I am trying to access my api and I am getting back the access token. With my access token, I can access ... to use sessions on the site to keep track of the internal user ids. Unable to know if my sessions could be causing the problem.
asked Jan 10, 2020 alecxe 7.5k points
1 vote
1 answer 384 views
384 views
Problem : Currently I am struggling to find out what is actually happening with my code. My all scripts were working really fine previously but now they are suddenly half stopped. I am trying to access the api but I am getting back the access token. ... am facing below error : Fatal error: Uncaught OAuthException: An active access token must be used to query information about the current user.
asked Dec 30, 2019 alecxe 7.5k points
0 votes
1 answer 6 views
6 views
Question: I need to get 50 random Facebook friends and assign the result to this variable user_ids used in this function sendRequestToRecipients(). I need some help to make this function working. Here is my code: <body> <div id="fb-root"></div> <script ... : 'apprequests', message: 'sample message' }, requestCallback); } function requestCallback(response) { // Handle callback here } </script>
asked Apr 18 munim01 21k points
1 vote
1 answer 7 views
7 views
Problem: Currently my app has option to log in via facebook , I decided to add the option to register with facebook but I don&rsquo;t have any idea on how to do this ? Can somebody tell me how to do this ?
asked Apr 4 Raj Tyagi 15.6k points
0 votes
1 answer 7 views
7 views
Question: How to get Facebook Friends Birthdays in order of upcoming like: show top on list those birthdays are coming next by using current date and so on. still i am getting birthdays in form of January to December, Getting Friends on Top those birthdays in January and on bottom ... )AND birthday_date >= '" + month + "/01' AND birthday_date <= '" + month + "/31' ORDER BY birthday_date ASC";
asked Apr 14 Atik03 26.5k points
0 votes
1 answer 4 views
4 views
Problem: I am in trouble while solving it .. please help me .. how to see how long i've been friends with someone on facebook
asked Apr 6 Ifra 37.2k points
0 votes
1 answer 9 views
9 views
Problem: As I mentioned in my previous query, I'm having difficulties with my learning; I've tried searching the web but haven't been able to find adequate information; could you assist me in continuing my project?
asked Apr 1 rakib1 51.5k points
0 votes
1 answer 3 views
3 views
Problem: I'm trying to figure out a solution, need help >Cara sign in with google temporarily disabled for this app.
asked 5 days ago Florina Gulnar 7.9k points
0 votes
1 answer 2 views
2 views
Problem: We are facing the below thing when trying to authenticate to Google. The app that we are trying to authenticate is used for internal development and we did not publish it to our users. Sign in with Google temporarily disabled for this app Any idea why this occurs?
asked May 3 muktaa 34.6k points
0 votes
1 answer 2 views
2 views
Problem: We are facing the below screen when trying to authenticate to Google. The app that we are trying to authenticate is used for internal development and we did not publish it to our users. Any idea why this occurs? We faced an Unverified App screen before (as below) but now the authentication is disabled.
asked May 3 Yeamin 22k points