Page 1 of 3

Facebook like button

PostPosted: Fri Aug 13, 2010 3:13 pm
by jadwigo
This is the feedback topic for the facebook like button extension

Visit http://extensions.pivotx.net/entry/26/facebooklike for more info or download.

Re: Facebook like button

PostPosted: Sun Aug 22, 2010 3:36 pm
by PvC
[[like]] ;-)

Re: Facebook like button

PostPosted: Wed Aug 25, 2010 6:11 pm
by PvC
Ik heb ALLOWTRANSPARANCY toegevoegd aan de iFrame. Daardoor is deze ook in IE transparant (en dus geen lelijk wit vlak als je een andere achtergrondkleur hebt). Of zijn hiervoor betere oplossingen?

sorry, shouldn't have used dutch:
I've added ALLOWTRANSPARANCY to the iFrame, this makes the iFrame transparent in IE so it automatically takes the colour of the page it is placed on. Is this a good idea or shouldn't I use ALLOWTRANSPARANCY?

Re: Facebook like button

PostPosted: Thu Aug 26, 2010 10:55 pm
by AnnaDenise
Eeehhmmm...

A very dumb question, perhaps, but how do I implement this? I dragged the files to my extension folder on the server, ticked the extension box in pivotx...
... what tag do I use? And if I put it in the metadata span of my entry, will that work?

Sorry if this question is completely lame, just couldn't find this info anywhere :-) Thanks guys!

Re: Facebook like button

PostPosted: Fri Aug 27, 2010 5:37 am
by PvC
the Tag is [[facebook_like]], but you can best read the instructions by clicking the Full Instructions link (on the extensions page, right where you 'tick' the extension)

Re: Facebook like button

PostPosted: Mon Aug 30, 2010 8:02 am
by Bob
I've added ALLOWTRANSPARANCY to the iFrame, this makes the iFrame transparent in IE so it automatically takes the colour of the page it is placed on. Is this a good idea or shouldn't I use ALLOWTRANSPARANCY?


I think allowtransparency would work just fine, as long as you know what you're doing. When i made the extension, i just implemented it the way it was on the facebook documentation page.

Perhaps i should add an extra, optional flag for it? :-)

Re: Facebook like button

PostPosted: Mon Nov 22, 2010 10:22 am
by Logfather
I'm wondering if anyone is actively using the Facebook Like plugin for PivotX together with some Open Graph meta tags? Wondering how you tell the people at FB to fetch the image at the top of a post... ;)

Re: Facebook like button

PostPosted: Tue Nov 23, 2010 9:03 pm
by Bob
You can NOT force facebook to use an image you want, but you can suggest a title, description and image.

Add this somewhere in the <head> section of your templates. Like in the _sub_header.tpl:

Code: Select all
[[ if $modifier.pagetype=="entry"]]
   <meta property="og:title" content="[[title|escape]]" />
   <meta property="og:description" content="[[introduction|strip_tags|escape]]" />
   <meta property="og:image" content="http://example.org/pivotx/includes/timthumb.php?src=[[$entry.extrafields.image]]&w=130&h=110" />
[[/if]]


Do not change the dimensions of the thumbnail in og:image. 130x110 is the preferred size for facebook, ao it's most likely to get picked.

Re: Facebook like button

PostPosted: Sat Nov 27, 2010 1:03 pm
by Logfather
To give some info back: Bob's code works PERFECTLY. I am just not using the Extrafields extension (should I? Maybe I'll try it out :)) so I left the image bit out for now (it's mandatory by Facebook standard, but the rest of your code still works if you leave it out).

The amazing bit? It's one thing to get things like this (the button) to work on an entry page but this code ALSO works on the frontpage or archivepage. Using Bob's code Facebook recognizes the correct title, link, image and site title (or whatever og:'s you added). I added fb_admin but I haven't yet figured out what's the deal with this code. Be sure to check out the Open Graph protocol page for more info.

TIP #1: It's annoying to check if your code is working by liking your own stuff and then checking your Facebook page. Instead use the Facebook Linter page.

TIP #2: It might be all the code in between my <head></head> but Facebook didn't read my og:code at first and than goes on scraping random stuff. Moving the code around helped me out but this is obviously not the correct way to work (because I think some other code is broken) so I will have to go back and look through all my code.

Re: Facebook like button

PostPosted: Wed Dec 01, 2010 9:15 am
by Winjer
Now this is probably PivotX 101, so excuse the stupid question, but: How can I prevent the wrap after the like button?

I'd like to insert the button just before the star rating tag, but I want both the like button and the star rating to show in the same line. Is that possible?

Thank you!