× Joomla Facebook Connect support forum

Topic-icon Problem with connecting from front end

Support Specialist
14 years 8 months ago #13836 by alzander
Manos,
We agree, it's an issue. Coincidentally, Facebook just put out a developer blog post regarding this issue, stating how difficult it is to 'shrink' a page. They actually can't fix it, and their solution is simply to rename the setAutoResize funtion to setAutoGrow so that the actual behavior is less confusing.
developers.facebook.com/blog/post/565/

Their recommendation is that on dynamic pages, to use the setSize function, but in that case, you'd need to know the final height ahead of time.

This affects us too, and we agree it isn't great, but it's the best that can be done in a dynamic Joomla environment. While we've heard this request once or twice from admins/subscribers, we've never heard issues from end-users. I think it's something that admins catch and see more than actual users of the page because they know what should be happening vs what actually is.

Hope that helps explain,
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 8 months ago #13837 by 7of9
Hi Alex,

So what you tell me is that the solution is, there is no solution? :D
Is there a way to know the size of each of my page? And if yes, could there be a script that would resize the page accordingly?
My first concern if not the mess with your component, since I see that it stops working when I have an other part of code using Facebook API.

Kind regards,

Manos
The topic has been locked.
Support Specialist
14 years 8 months ago #13875 by alzander
There really isn't a good way to know the height of your page. Since the height can change dynamically by Javascript running on the page itself, it would have to be a constant check to see what the height is, and resize to that, which could cause a lot of 'jumping' around in the browser. Additionally, every browser is different, which means heights aren't always the same, which means compatibility is another issue.

Basically, if Facebook is throwing in the towel on trying to get 'shrinking' to work, it's a good indicator that there isn't a magic bullet to get it going.

Hope that makes sense,
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 8 months ago #13906 by 7of9
It appears that auto expanding does not work either. I created a quiz which contains a lot of picture hotspot questions and the result is a long results page at the end. However the page is cut at the height of the home page. This is a huge problem as you can imagine.
The topic has been locked.
Support Specialist
14 years 8 months ago #13934 by alzander
Can you tell me how to navigate to your quiz from your FB Page sowe can take a look?

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 8 months ago #13943 by 7of9
First you have to login with facebook. Then from the main menu, navigate to Contests / Christmas 2011 / Quizzes and Play the Intermediate Quiz. After the end of the Quiz, you will see the results. Either choose to display 15 instead of 5, or change the page to see the page that has the most hotspot questions.

Thanks
The topic has been locked.
Active Subscriptions:

None
14 years 8 months ago #14009 by 7of9
Did you by any chance take a look at it? Because I have to release the site to be live on October 1st.
Thanks
The topic has been locked.
Support Specialist
14 years 8 months ago #14042 by alzander
Manos,
Just tested, and can see the problem. Still not sure of the cause, but if you could, please try the following code modification. In the /plugins/system/jfbcsystem.php file, around line 140, you'll see:
if ($this->jfbcCanvas->get('resizeEnabled', false))
            $resizeCode = "window.setTimeout(function() {\n" .
                          "  FB.Canvas.setAutoResize();\n" .
                          "}, 250);";
        else
            $resizeCode = "";
Simply comment out the if/else portions (leaving the $resizeCode block as is), so it looks like the following:
// if ($this->jfbcCanvas->get('resizeEnabled', false))
            $resizeCode = "window.setTimeout(function() {\n" .
                          "  FB.Canvas.setAutoResize();\n" .
                          "}, 250);";
        //else
        //    $resizeCode = "";

Basically, what we're seeing is that the setAutoResize function isn't being set after we login through the Canvas. It's possible this is a bug with JFBConnect, some behavior of Facebook we weren't aware of, or something else completely. We'll have to investigate more, but if you can let us know how that works out for you, it will help us out a lot... and hopefully get you ready for Oct 1st.

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

None
14 years 8 months ago #14054 by 7of9
That did it! Check it out for yourself. So what is the problem? Am I supposed to leave this fix? What will happen with the next update?

Thanks man. :D
The topic has been locked.
Support Specialist
14 years 8 months ago #14063 by alzander
Leave the fix. It shouldn't cause any problems and is simply something we'll have to look into for the next release. It seems like the act of logging the user into the site through Facebook causes issues with our Canvas page detection. It should be easy for us to recreate, but don't know anything else right now.

Good luck,
Alex
The topic has been locked.