× Joomla Facebook Connect support forum

Topic-icon Fatal error: Cannot use object of type stdClass as array in ....

Active Subscriptions:

None
Hey,

I've bougt the JFB Module today and like to try it. I've created the app, put in the api etc. - no problem. If I wanna try the login I've got the message: "Es ist ein Fehler aufgetreten. Bitte versuche es später noch einmal."

If i start the overview page if got the following message: Fatal error: Cannot use object of type stdClass as array in /srv/www/vhosts/blink-182.de/httpdocs/denny/administrator/components/com_jfbconnect/views/jfbconnect/view.html.php on line 48

What should i do? My test joomla is 1.5.15, with php 5.2.11 (here's a link to the php info )

Please help me :)
The topic has been locked.
Support Specialist
Hi there,
First off, the error your getting on the page is because you have another plugin that's trying to load the Facebook Javascript API. If you open the HTML on your page and search for "all.js", you'll see it's included 2 times. Once, at the top, is by us. The other, towards the bottom is from something else. Additionally, just above the all.js line in both cases is your Facebook Application Id.. which in both cases is different. This is why Facebook is throwing an error.. it's confused which app your trying to log into.

As for the error your seeing in the admin area, that's completely new to us. I'd recommend using the component menu, going to JFBConnect->Configuration (bypassing the overview page) and ensuring that your API/Secret keys are setup correctly. It's also possible the above inclusion of another Facebook extension is causing some problems.

If none of the above helps, let us know, and we may ask for admin credentials (if we can) to get in and look around at what might be the cause.

Thanks, and good luck!
The topic has been locked.
Active Subscriptions:

None
HEy alzander,

thanks for your repley. The overview page works now, but i still can't login. Could you help me? What do you need?

Is there a way to load the Facebook Javascript API two times? We're using another module which but up our news to twitter & fb. (Autotweet)

Thanks a lot!

Uwe
The topic has been locked.
Support Specialist
There are ways to load the FB library twice (or just to disable one of them), which we can help you with. However, before we get to that, can you try (temporarily) disabling the AutoTweet module and see if that fixes the login issue? If so, then we know we're on the right path. It's easier to do that then to give you some code changes and then find out it doesn't help.

If you don't want to disable the other extension, then at least use the same Facebook application ID for both. This is the main problem that Facebook is likely having problems with, since when a user tries to register, Facebook doesn't know what application they are trying to register. If you look at your HTML, and search for appId, you'll see 2 different strings of numbers. Those should be the same.

Hope this helps!
The topic has been locked.
Active Subscriptions:

None
Hey alezander,

i've tried some ways but nothing works.... Could you see if you can help me?
The topic has been locked.
Support Specialist
Uwe,
You can load the Javascript library multiple times, but they absolutely cannot have different application IDs. This will confuse Facebook and cause the issues you're having. They will be 'random' because sometimes, for some functions, the right AppID will be used, and other times, the other 'incorrect' ID will be used for whatever your trying to do (Like, Login, etc). On your page, I see the following 2 appIds:
192463310792363 - Used by JFBConnect
---- Which goes to this App Page: www.facebook.com/apps/application.php?id=192463310792363)
e8a3aa855c603c825e217d34d8685fc7 - Used by the "FB JSDK Kit"
---- This app page redirects to FB.com for some reason: www.facebook.com/apps/application.php?id...3c825e217d34d8685fc7

Is there a reason you need 2 different applications for 1 site? Generally, you should try to consolidate these so that all your information, user's Like'ing, Logging in, and general promotion that can be done through applications is all contained in one place. JFBConnect doesn't care which of the above you settle on, but you should choose only one.

Hope this helps explain the problem, and a possible solution.
The topic has been locked.
Active Subscriptions:

None
so, I've found the mistake! There was a third fb plugin with the different ID:

But now, I'll try to login and got this error:

Fatal error: Cannot use object of type stdClass as array in /srv/www/vhosts/blink-182.de/httpdocs/denny/plugins/authentication/jfbconnectauth.php on line 101
The topic has been locked.
Support Specialist
Hmm. If the code is going down that path, it means that there's something wrong, in all honesty. Basically, that line is if we aren't able to get information about the user correctly. This could be from the 'other' extension interfering with our calls to Facebook, or JFBConnect having issues communicating to Facebook itself.

Is it possible to give us admin access to the site to test what's going on? That may help us get to the bottom of this issue much quicker as something definitely seems strange. If not, let us know, and we'll continue in the forms. If you can though, please Private Message us an account to log in with.

Thanks!
The topic has been locked.
Active Subscriptions:

None
did you recieve my message?
The topic has been locked.
Support Specialist
Uwe,
I did get you message, and sorry for the delay. We were at a Joomla day this past weekend, and it slowed us down in some of our responses.

I just went to your page, and I'm not currently able to log in. I get a "An error has occurred with this application" when I try to click the login with facebook button. After looking around a little, it looks to be how your Facebook Application is configured. The Site URL for your application looks to be pointing to:
apps.facebook.com/europeanfanclub/
Since this isn't your site, Facebook won't let users Login when if you use the button on your site. You can only use the Login button on your application's Site URL and Base URLs (for subdomains), so this will need to be updated.

Unfortunately, since I can't login, I can't look any further into the other error you're receiving. Hopefully this helps get you started, and if you get the Site URL set back up correctly, I'll make sure to prioritize any other requests you have.

Thanks,
Alex
The topic has been locked.