× Joomla Facebook Connect support forum

Topic-icon Blank page after pressing FB Connect

Active Subscriptions:

None
14 years 6 months ago #2108 by Korpio
Im getting a blank page after pressing the FB Connect button, and this errer is been displayed:
Fatal error: Uncaught exception 'FacebookRestClientException' with message 'A session key is required for calling this method' in /home/site/httpdocs/administrator/components/com_jfbconnect/assets/facebook-api/facebookapi_php5_restlib.php:2458 Stack trace: #0 /home/site/httpdocs/administrator/components/com_jfbconnect/assets/facebook-api/facebookapi_php5_restlib.php(303): FacebookRestClient->call_method('facebook.auth.e...', Array) #1 /home/site/httpdocs/administrator/components/com_jfbconnect/assets/facebook-api/facebook.php(219): FacebookRestClient->auth_expireSession() #2 /home/site/httpdocs/components/com_jfbconnect/helpers/facebookhelper.php(187): Facebook->expire_session() #3 /home/site/httpdocs/components/com_jfbconnect/controller.php(45): JFBConnectFacebookHelper->logoutFacebookUser() #4 /home/site/httpdocs/libraries/joomla/application/component/controller.php(236): JFBConnectCo in /home/site/httpdocs/administrator/components/com_jfbconnect/assets/facebook-api/facebookapi_php5_restlib.php on line 2458

Can someone help me?

My site page is:
<!-- m --><a class="postlink" href="www.enteratenorte.com/index.php?option=c...le&id=189&Itemid=129">www.enteratenorte.com/index.php? ... Itemid=129

(note: That is the only page were the JCBLogin module is displayed)
The topic has been locked.
Support Specialist
14 years 6 months ago #2122 by alzander
Are you still getting this error? It's usually caused in very rare circumstances when you've first installed the component, the API key and Secret key have just been created, and you were already logged into Facebook when you try to visit your site. Facebook gets confused with the new key and throws it. It usually resolves itself very quickly, though you may need to close your browser and re-open it.

I'm not able to see the login module on the page you link to. Let us know if the above helps clarify the issue.
The topic has been locked.
Active Subscriptions:

None
14 years 6 months ago #2127 by Korpio
I just installed the component in another site but with Comunity Builder and have the same problem:

<!-- m --><a class="postlink" href="www.exa913.com">www.exa913.com

It works well for a couple of minutes, but after you logout, and login it stars to fail
The topic has been locked.
Support Specialist
14 years 6 months ago #2128 by alzander
That's definitely not good/right. I can recreate it pretty easily myself.

Can you PM me a Super Admin account for either site? I'd like to check a few things, and test some of the new code from our upcoming release. We also may try a proven API/Secret key to see if that doesn't have the issue so that we can eliminate your FB app as a source of the problem.

Sorry for the inconvenience, but we'll get you up and running.
The topic has been locked.
Active Subscriptions:

None
14 years 6 months ago #2131 by Korpio
Now im getting a blank page with this error:
Fatal error&#58; Cannot redeclare class FacebookRestClientException in /xxxxxxx/httpdocs/administrator/components/com_jfbconnect/assets/facebook-api/facebookapi_php5_restlib.php on line 2690

On my site: www.enteratenorte.com

That happens if I publish the Login or Invite module
The topic has been locked.
Support Specialist
14 years 6 months ago #2132 by alzander
We began (and still are) investigating your radio site. It's very strange what's happening. We've never seen the admin area say that the session is expired like it is on your site. If we trade out your key with a development key we have, it shows the correct application and callback information. If we use your key in one of our dev sites, it shows correctly too. For some reason, it's like your site doesn't like the Facebook application.

The new error your describing below is caused when you're using other Facebook extensions on your site that use the Facebook php library. This can be from JomSocial or 'fan'-type modules.

The next version of JFBConnect will properly check if the library's already been instantiated and not throw the error like it is there. If you'd like to add the check yourself for now, you can try the following:
In the /components/helpers/facebookhelper.php file, around line 136, add the following bold statement:
if (!class_exists('FacebookRestClient'))
include_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_jfbconnect'.DS.'assets'.DS.'facebook-api'.DS.'facebook.php');

Sorry for the inconvenience. We'll let you know what we determine about your other issue.
The topic has been locked.
Active Subscriptions:

None
14 years 6 months ago #2133 by Korpio

sourcecoast wrote: The new error your describing below is caused when you're using other Facebook extensions on your site that use the Facebook php library. This can be from JomSocial or 'fan'-type modules.

The next version of JFBConnect will properly check if the library's already been instantiated and not throw the error like it is there. If you'd like to add the check yourself for now, you can try the following:
In the /components/helpers/facebookhelper.php file, around line 136, add the following bold statement:
if (!class_exists('FacebookRestClient'))
include_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_jfbconnect'.DS.'assets'.DS.'facebook-api'.DS.'facebook.php');


Hi, I opened httpdocs/components/com_jfbconnect/helpers/facebookhelper.php

And added the two lines you told on line 136, and it looks like this:
132	if (self&#58;&#58;$_FbRoot->user)
133	{ # There's a FB user logged in
134	  # check if user is logged into Joomla.
135	  # If not, either&#58;
136	  if (!class_exists('FacebookRestClient'))
137	  include_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_jfbconnect'.DS.'assets'.DS.'facebook-api'.DS.'facebook.php');
138	  #  1) Check if they have a mapped Joomla account, and log that user in
139	  #  2) If not, set their fb uid to 0, even if they have a session
140	  #echo "FBHelper&#58; FB user logged in &#58; ".self&#58;&#58;$_FbRoot->user;
141	  $jUser =& JFactory&#58;&#58;getUser();
142	  if ($jUser->guest)

But I got the same error <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very Sad" /><!-- s:cry: -->
The topic has been locked.
Active Subscriptions:

None
14 years 6 months ago #2134 by Korpio

Korpio wrote: Hi, I opened httpdocs/components/com_jfbconnect/helpers/facebookhelper.php

And added the two lines you told on line 136, and it looks like this:

132	if (self&#58;&#58;$_FbRoot->user)
133	{ # There's a FB user logged in
134	  # check if user is logged into Joomla.
135	  # If not, either&#58;
136	  if (!class_exists('FacebookRestClient'))
137	  include_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_jfbconnect'.DS.'assets'.DS.'facebook-api'.DS.'facebook.php');
138	  #  1) Check if they have a mapped Joomla account, and log that user in
139	  #  2) If not, set their fb uid to 0, even if they have a session
140	  #echo "FBHelper&#58; FB user logged in &#58; ".self&#58;&#58;$_FbRoot->user;
141	  $jUser =& JFactory&#58;&#58;getUser();
142	  if ($jUser->guest)

But I got the same error <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very Sad" /><!-- s:cry: -->


I disable all facebook features in JomSocial and the fanbox and im still getting the blank page :(

And in my Radio Site, I have the fan box activated and it works well with mod_jfbclogin and mod_jfbcinvite
The topic has been locked.