Session Key Invalid error on user/edit page
Mark B - March 19, 2009 - 08:54
| Project: | Drupal for Facebook |
| Version: | 5.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
When I try to edit a user profile page, I get the error Facebook API exception Session key invalid or no longer valid.

#1
Looks like the fb_user_user function is fb_user.module is still using fb_api_init($fb_app, FB_FBU_ANY) when called with $op=cateogries. Changing this to FB_FBU_NO_SESSION has fixed it.
#2
#3
does not work for me ...
still get
Facebook API exception Session key invalid or no longer valid.
#0 /home/dennfabi/fabforge/moodboard/modules/fb/facebook-platform/php/facebookapi_php5_restlib.php(994): FacebookRestClient->call_method('facebook.fql.qu...', Array)
#4
while we do not catch the exception php cause to break the whole page..
add a try - catch arounf the api calls ...
i change this in fb_friends.module ..
123 try {
124 $rs = $fb->api_client->fql_query("SELECT uid FROM user WHERE has_added_app=1 and uid IN (SELECT uid2 FROM friend WHERE uid1 = $fbu)");
125 } catch (Exception $e) {
126 echo 'Caught exception: ', $e->getMessage(), "\n";
127 }
166 // Get list of friends who have authorized this app.
167 try {
168 $rs = $fb->api_client->fql_query("SELECT uid FROM user WHERE has_added_app=1 AND uid IN (SELECT uid2 FROM friend WHERE uid1 = $fbu)");
169 } catch (Exception $e) {
170 echo 'Caught exception: ', $e->getMessage(), "\n";
171 }
the exception dissapear after viewing the invite friends block ..