Topic-icon Facebook Tab to canvas

Active Subscriptions:

None
12 years 4 months ago #40411 by master38851
Hello,

When I click my Facebook tab I want it to show the canvas page.

I seen a code change from 2 years ago talking about it but it was so old I figured I better post a new topic.

Thanks
The topic has been locked.
Support Specialist
12 years 4 months ago #40415 by alzander
Replied by alzander on topic Facebook Tab to canvas
There's no way to have Facebook show your Canvas automatically. You'd need to setup a redirect in your site to force the user to your Facebook Canvas area. That used to be a common request 2 years ago, but Facebook since made the Page Tab area much wider, so it hasn't been requested as much. Honestly, I wouldn't recommend making the redirect because then the links back to your Facebook Page will no longer be present.

However, with that said, performing the redirect is likely similar to how we did it before. Can you find that old post and let us know what you were looking at? Instead of having to investigate what to do again, updating what we already provided (and worked) would probably get you a better answer, faster.

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

None
12 years 4 months ago #40417 by master38851
Replied by master38851 on topic Facebook Tab to canvas
Sure,

Here is a link to the old post: www.sourcecoast.com/forums/jfbconnect/jf...-on-home-page#p22579

I was not allowed to reply to it so I started this one.

Thanks
The topic has been locked.
Support Specialist
12 years 4 months ago #40419 by alzander
Replied by alzander on topic Facebook Tab to canvas
Awesome! Thanks for the link. That definitely saves some time. We auto-close old posts to prevent users from reviving them when they usually aren't relevant anymore.

To implement the same change, you should edit the /components/com_jfbconnect/libraries/facebook/canvas.php file. Around line 144, you'll see:
else
        {
            $tabTemplate = JFBCFactory::config()->getSetting('canvas_tab_template');
            $this->setTemplate($tabTemplate);
        }
Change that to:
else 
        { 
           echo '<html><head></head><body><script type="text/javascript">top.location.href = "https://apps.facebook.com/YOUR_APP_URL";</script></body></html>'; 
           $app->close(); 
           $tabTemplate = $this->configModel->getSetting('canvas_tab_template'); 
           $this->setTemplate($tabTemplate); 
        }
Honestly, you can have that redirect go to whatever page you want.. even you're 'real' site, and not the Canvas URL. However, can fall a little afoul of Facebook's App policies since they, obviously, want to keep users on their site. We've never heard of anyone getting banned for doing so, but if you're Page is *huge*, it might get their attention. It's up to you how to use the code above though :)

I hope that helps, but should you need anything else, just let us know!

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

None
12 years 4 months ago #40421 by master38851
Replied by master38851 on topic Facebook Tab to canvas
Hello,

That did not work for some reason?

I changed to code and the URL to my canvas is: apps.facebook.com/boattreasure/

But you can go to my tab and it is still in the small frame: www.facebook.com/boattreasurecom/app_182648175246065

Not sure how to make it wider.

Thanks
The topic has been locked.
Active Subscriptions:

None
12 years 4 months ago #40424 by master38851
Replied by master38851 on topic Facebook Tab to canvas
Was playing around with the URL and no matter what I put in there it goes to the Facebook tab url in the small frame?

Thanks
The topic has been locked.
Support Specialist
12 years 4 months ago #40428 by alzander
Replied by alzander on topic Facebook Tab to canvas
Your site doesn't have an SSL certificate installed on it. Because of that, the Facebook Page Tab feature won't work as expected and will not load for most users. Facebook defaults all users to load content over https. If your site doesn't support this, your page will not load for those users unless they've specifically allowed non-https (non-secure) pages to load. This is *very* uncommon.

Additionally, Facebook sends some information to JFBConnect over the secure connection. We use that information to determine the user is viewing your site in a Page Tab. If you don't have https enabled, Facebook doesn't send that information, and we have no way of knowing how the page is being loaded.

I hope that helps explain. Until you get a valid https certificate on your site, the Page Tab features of JFBConnect will not fully work as you want them to.

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

None
12 years 4 months ago #40431 by master38851
Replied by master38851 on topic Facebook Tab to canvas
Hello,

I do have one installed. Before I installed it will not show at all on Facebook. You can see it because it's at boattreasure.com and that redirects to the www domain with the htaccess.

Like I said before I installed it Facebook would not show anything. Facebook will not show a site with an invalid ssl cert.

The problem is the URL redirection. No matter what I put in there including www.google.com/ it still goes to the same tab.

Am I missing something?
The topic has been locked.
Active Subscriptions:

None
12 years 4 months ago #40434 by master38851
Replied by master38851 on topic Facebook Tab to canvas
I am changing my SSL to work on the www domain. Will see how that works first.
The topic has been locked.
Active Subscriptions:

None
12 years 4 months ago #40438 by master38851
Replied by master38851 on topic Facebook Tab to canvas
Took all night LOL but I got the SSL installed correctly and all is working now.

Thanks
The topic has been locked.