[Solved] Facebook "Like" on each article in "News Module"

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Compalink

Re: [Solved] Facebook

Post by Compalink »

thanks a lot for your time webform
I dont know why sometimes easy things become complicated..

sorry for bother.. now everything works great.

best regards :)
webform
Power Poster
Power Poster
Posts: 458
Joined: Sat Nov 25, 2006 3:39 pm
Location: Copenhagen, Denmark

Re: [Solved] Facebook

Post by webform »

No bother - Glad if i could help :)
Compalink

Re: [Solved] Facebook

Post by Compalink »

I'm back again..

I (with the valued help from webform) left the like button working fine yesterday and today just desapear?? what happened? is something wrong with the source at facebook?

anyone knows?

I've tried on differents browsers and is the same.. (it is showed on the page source)

???
webform
Power Poster
Power Poster
Posts: 458
Joined: Sat Nov 25, 2006 3:39 pm
Location: Copenhagen, Denmark

Re: [Solved] Facebook

Post by webform »

I think it's Facebook - Mine is also gone! So give it some time and see if it returns!
webform
Power Poster
Power Poster
Posts: 458
Joined: Sat Nov 25, 2006 3:39 pm
Location: Copenhagen, Denmark

Re: [Solved] Facebook

Post by webform »

Facebook Developer Forum is flooded with others missing the like button.

One workaround, that seems to work, is to place the following code right before the Facebook javascript:

Code: Select all

<div id="fb-root"></div>
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: [Solved] Facebook

Post by Nullig »

Hadn't heard about that workaround - I had changed all of mine to use the iframe code.

Nullig

P.S. I use similar code for the CGCalendar module Event template:

<div id="fb-root"></div>
<__script__ src="http://connect.facebook.net/en_US/all.j ... t><fb:like href="http://www.website.com{$smarty.server.REQUEST_URI}" show_faces="true" width="450" colorscheme="dark"></fb:like>
catchlight
Forum Members
Forum Members
Posts: 20
Joined: Wed Jan 28, 2009 1:12 am

Re: [Solved] Facebook

Post by catchlight »

I thought I'd share some code for the iframe version as it seems to be where Facebook are heading rather than FBML:

Code: Select all


<__iframe src="http://www.facebook.com/plugins/like.php?app_id=148139585258930&href=http://www.website.com{$smarty.server.REQUEST_URI}&send=false&layout=standard&width=450&show_faces=false&action=like&colorscheme=light&font&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></__iframe>

urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am
Location: Finland

Re: [Solved] Facebook

Post by urheat »

I want to use iframe embedding, but there is something wrong with the url.

{$entry->link} works fine with XFBML embedding, but if use it with iframe, the url is chopped like this:

Code: Select all

index.php?mact=News%2Ccntnt01%2Cdetail%2C0
It should be:

Code: Select all

index.php?mact=News%2Ccntnt01%2Cdetail%2C0&cntnt01articleid=7&cntnt01pagelimit=5&cntnt01returnid=15
So the first & character is the problem...? Here's the full code:

Code: Select all

<__iframe src="//www.facebook.com/plugins/like.php?href={$entry->link}&send=false&layout=standard&width=297&show_faces=false&action=like&colorscheme=light&font&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:297px; height:35px;" allowTransparency="true"></__iframe> 
{$smarty.server.REQUEST_URI} isn't the answer, cause the url isn't the current page url. It's the url of the detail page of the news.

Thanks in advance :)
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am
Location: Finland

Re: [Solved] Facebook

Post by urheat »

I turned on the SEO friendly urls and now Facebook Like buttons work. But I still have one pretty strange issue.

I user likes the article in the article list (summary page) and goes to the detail page of article, like button is showing that user hasn't clicked it.

The code of the like button in detail and summary page are the same.

Any ideas?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: [Solved] Facebook

Post by Dr.CSS »

I would only have the like button on the detail as the summary isn't quite the article but just part of it...
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am
Location: Finland

Re: [Solved] Facebook

Post by urheat »

Dr.CSS wrote:I would only have the like button on the detail as the summary isn't quite the article but just part of it...
Me too, 'cause everything would be so much easier. But 'cause it's pretty important that user can click Like as soon as possible and that is what client wants ;)

But... I'm not sure if the problem fixed itself. Maybe Facebook has some kind of a cache of these Like Button properties, but some of the articles are working now correctly and some aren't.
Locked

Return to “Modules/Add-Ons”