Bug POst Results to Facebook - error

Status
Not open for further replies.

Morrus

Customer
When I click "post results to Facebook" after completing a quiz, I get this error:

An active access token must be used to query information about the current user. on line 1041 in /var/www/virtual/enworld/forum/includes/facebook/base_facebook.php
#0 /var/www/virtual/enworld/forum/includes/facebook/base_facebook.php(746): BaseFacebook->throwAPIException(Array)
#1 [internal function]: BaseFacebook->_graph('/me/permissions')
#2 /var/www/virtual/enworld/forum/includes/facebook/base_facebook.php(555): call_user_func_array(Array, Array)
#3 /var/www/virtual/enworld/forum/dbtech/vbquiz/actions/dofacebookpost.php(76): BaseFacebook->api('/me/permissions')
#4 /var/www/virtual/enworld/forum/vbquiz.php(318): include_once('/var/www/virtua...')
#5 {main}


Fatal error: An active access token must be used to query information about the current user. on line 1041 in [path]/includes/facebook/base_facebook.php in [path]/vb/vb.php on line 286
#0 vb_error_handler(256, An active access token must be used to query information about the current user. on line 1041 in /var/www/virtual/enworld/forum/includes/facebook/base_facebook.php , /var/www/virtual/enworld/forum/vb/vb.php, 286, Array ([exception] => FacebookApiException Object ([] => Array ([error] => Array ([message] => An active access token must be used to query information about the current user.,[type] => OAuthException,
Code:
 => 2500)),[] => An active access token must be used to query information about the current user.,[] => ,[] => 0,[] => /var/www/virtual/enworld/forum/includes/facebook/base_facebook.php,[] => 1041,[] => Array ([0] => Array ([file] => /var/www/virtual/enworld/forum/includes/facebook/base_facebook.php,[line] => 746,[function] => throwAPIException,[class] => BaseFacebook,[type] => ->,[args] => Array ([0] => Array ([error] => Array ([message] => An active access token must be used to query information about the current user.,[type] => OAuthException,[code] => 2500)))),[1] => Array ([function] => _graph,[class] => BaseFacebook,[type] => ->,[args] => Array ([0] => /me/permissions)),[2] => Array ([file] => /var/www/virtual/enworld/forum/includes/facebook/base_facebook.php,[line] => 555,[function] => call_user_func_array,[args] => Array ([0] => Array ([0] => Facebook Object ([] => 261927413865230,[] => 4a17239c2aa16b9a53ba2e760db87659,[] => 505243706,[] => Array ([algorithm] => HMAC-SHA256,[code] => AQCRPZjC4J0Z6pjoPdd-8cmb7zpO232jfsF-0V0tnaNEycZhO6SaQy4mQ5vL_w0JRcLmXuqdnEb818oi_2s5od71D2bOb3XqC7OPLmiVc4vrdG_nxebqaDuj1Mj4BANhbpe0IFc_EJQz466Yvbkl0TryB1c2fqNDgjcUZqeWkTqYxRlD0bvJGkRlcVG3AxeJc8B-wtLwvPyasZwqrsOXWRt6,[issued_at] => 1357136917,[user_id] => 505243706),[] => ,[] => 261927413865230|4a17239c2aa16b9a53ba2e760db87659,[] => ),[1] => _graph),[1] => Array ([0] => /me/permissions))),[3] => Array ([file] => /var/www/virtual/enworld/forum/dbtech/vbquiz/actions/dofacebookpost.php,[line] => 76,[function] => api,[class] => BaseFacebook,[type] => ->,[args] => Array ([0] => /me/permissions)),[4] => Array ([file] => /var/www/virtual/enworld/forum/vbquiz.php,[line] => 318,[args] => Array ([0] => /var/www/virtual/enworld/forum/dbtech/vbquiz/actions/dofacebookpost.php),[function] => include_once)),[] => ),[code] => 256)) [URL=http://www.dragonbyte-tech.com/usertag.php?do=list&action=hash&hash=1]#1[/URL]  trigger_error(An active access token must be used to query information about the current user. on line 1041 in /var/www/virtual/enworld/forum/includes/facebook/base_facebook.php , 256) called at [/var/www/virtual/enworld/forum/vb/vb.php:286] [URL=http://www.dragonbyte-tech.com/usertag.php?do=list&action=hash&hash=2]#2[/URL]  vB::handleException(FacebookApiException Object ([] => Array ([error] => Array ([message] => An active access token must be used to query information about the current user.,[type] => OAuthException,[code] => 2500)),[] => An active access token must be used to query information about the current user.,[] => ,[] => 0,[] => /var/www/virtual/enworld/forum/includes/facebook/base_facebook.php,[] => 1041,[] => Array ([0] => Array ([file] => /var/www/virtual/enworld/forum/includes/facebook/base_facebook.php,[line] => 746,[function] => throwAPIException,[class] => BaseFacebook,[type] => ->,[args] => Array ([0] => Array ([error] => Array ([message] => An active access token must be used to query information about the current user.,[type] => OAuthException,[code] => 2500)))),[1] => Array ([function] => _graph,[class] => BaseFacebook,[type] => ->,[args] => Array ([0] => /me/permissions)),[2] => Array ([file] => /var/www/virtual/enworld/forum/includes/facebook/base_facebook.php,[line] => 555,[function] => call_user_func_array,[args] => Array ([0] => Array ([0] => Facebook Object ([] => 261927413865230,[] => 4a17239c2aa16b9a53ba2e760db87659,[] => 505243706,[] => Array ([algorithm] => HMAC-SHA256,[code] => AQCRPZjC4J0Z6pjoPdd-8cmb7zpO232jfsF-0V0tnaNEycZhO6SaQy4mQ5vL_w0JRcLmXuqdnEb818oi_2s5od71D2bOb3XqC7OPLmiVc4vrdG_nxebqaDuj1Mj4BANhbpe0IFc_EJQz466Yvbkl0TryB1c2fqNDgjcUZqeWkTqYxRlD0bvJGkRlcVG3AxeJc8B-wtLwvPyasZwqrsOXWRt6,[issued_at] => 1357136917,[user_id] => 505243706),[] => ,[] => 261927413865230|4a17239c2aa16b9a53ba2e760db87659,[] => ),[1] => _graph),[1] => Array ([0] => /me/permissions))),[3] => Array ([file] => /var/www/virtual/enworld/forum/dbtech/vbquiz/actions/dofacebookpost.php,[line] => 76,[function] => api,[class] => BaseFacebook,[type] => ->,[args] => Array ([0] => /me/permissions)),[4] => Array ([file] => /var/www/virtual/enworld/forum/vbquiz.php,[line] => 318,[args] => Array ([0] => /var/www/virtual/enworld/forum/dbtech/vbquiz/actions/dofacebookpost.php),[function] => include_once)),[] => ))
 
Are you logged into facebook from your site? I'll check and see if they made any changes that would mess up the code.
 
I'm not, no. Although facebook connect is enabled.

If that's the issue, is there not a more graceful way of handling people who are not logged into Facebook connect rather than spitting out an error page of code?
 
yes, I didn't realize the error would be like that heh. It's hard to dev/test facebook connection stuff. Because of the way vB uses it, I can't get it to connect with my local dev or our test site, which means I have to dev/test on this server.
I'll see if I can get a better error, or not show the button at all, for users not connected to facebook without breaking this site and making Fillip H. unhappy :)
 
I think I have this worked out now. Now when you aren't logged into facebook and you try to post results it takes you to the facebook page to login and check your permissions. I just uploaded v1.2.6 which has all the fixes we've worked in the past week.
 
Status
Not open for further replies.

Legacy vBQuiz

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
435
Customer rating
0.00 star(s) 0 ratings
Back
Top