× Joomla Facebook Connect support forum

Topic-icon In Case You're interested

Active Subscriptions:

None
15 years 2 months ago #8446 by rdbean
Hi Alex,

I'm currently working on showing parts or all of a J! website as a subdomain that only serves a different template (520px) from the main domain but sharing the same content with different module positions so the subdomain can be served as a facebook iframe application. Confused yet?

So far, I'm not seeing many issues with JFBC implementation, but am curious about how it will handle likes etc. I don't want them to like the subdomain page but the main domain page.

If you're interested I can send you the fB Page and the subdomain / main domain so you can see how it's coming along.

The whole idea is to be able to manage your Facebook Fan Page from within your Joomla site but all or most likes and comments get attributed to the main domain.

Cheers,

Rich
The topic has been locked.
Support Specialist
15 years 2 months ago #8457 by alzander
Replied by alzander on topic In Case You're interested
The Like button can be set to like any URL you want, as long as it's part of the application's Site or Base URLs. Since you're using a subdomain, just make sure the Base domain is set to "domain.com" and it will work for your main page (domain.com) and your sub (sub.domain.com).

This will take a little bit of effort though, as you'll have to manually set each Like button on the subdomain to point to the main domain's URL. This can be done in the module itself or in the { JFBCLike} tag using the href parameter.

In the 3.2 release, we'll make this a little easier for you as we'll be adding the ability to set the Open Graph tags on each page. These tags let you specify the canonical URL, image, description, and other data regarding what is being 'liked' when clicked. Once this is implemented, you'll be able to add these tags easily (hopefully) and have the URL point to the root domain instead of the subdomain. For more specifics on the Open Graph tags, should you have the interest in coding something now into your site (to automatically strip the subdomain from the URL for example), see the Facebook page below:
developers.facebook.com/docs/opengraph/

It will take some effort either way, but hopefully we'll be providing the tools soon to make it a little easier. :)

Good luck, and hope this helps!
The topic has been locked.
Active Subscriptions:

None
15 years 2 months ago #8462 by rdbean
Replied by rdbean on topic In Case You're interested
Thanks for the insight, that's what I thought.

The issue is going to be for items that are shown in both the domain and subdomain. Blog posts etc.

BTW...am looking forward to the Open Graph tags implementation.

Cheers,

Rich
The topic has been locked.
Active Subscriptions:

None
15 years 2 months ago #8464 by rdbean
Replied by rdbean on topic In Case You're interested
Hi Again,

OK Question...

You already load connect.facebook.net/en_US/all.js"></script> Correct?

If so, how can I also add

FB.Canvas.setSize();
and
FB.Canvas.setAutoResize();

Cheers Rich
The topic has been locked.
Support Specialist
15 years 2 months ago #8469 by alzander
Replied by alzander on topic In Case You're interested
Yes, we load the all.js script (and it's based on your Joomla language, so may not necessarily be en_US). It's done in the /plugins/system/jfbcsystem.php file. If you search for all.js, you'll find it in there in a Javascript block. If you need to add extra commands after it's loaded, you can do it there. If you need more specifics on how, just ask and we can help.

Good luck!
The topic has been locked.
Active Subscriptions:

None
15 years 1 month ago #9536 by rdbean
Replied by rdbean on topic In Case You're interested
OK this is starting to get to me...Can't seem to get it added without screwing it up.

am trying to add
window.setTimeout(function() {
    FB.Canvas.setAutoResize();
  }, 250);

It "should" go right after xfbml: true});

But I must be an idiot!
The topic has been locked.
Support Specialist
15 years 1 month ago #9542 by alzander
Replied by alzander on topic In Case You're interested
Not an idiot.. this stuff is tough, which is why we have a subscription system for support :)

Try the below:
window.fbAsyncInit = function() {
FB.init({appId: '{$appId}', status: true, cookie: true, xfbml: true});
window.setTimeout(function() { 
    FB.Canvas.setAutoResize(); 
  }, 250);
{$subs}
};
(function() { ....

If where you say is where that code should go, that should work out for you, but we haven't tested that.. just wanted to make sure you know.

If you need anything else, just let us know!
The topic has been locked.
Active Subscriptions:

None
15 years 1 month ago #9620 by rdbean
Replied by rdbean on topic In Case You're interested
Alex,

Worked like a charm thanks!

Rich
The topic has been locked.
Support Specialist
15 years 1 month ago #9628 by alzander
Replied by alzander on topic In Case You're interested
Very glad to hear it! Should you need anything else, just let us know!
The topic has been locked.