Module: Facebook like module
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
I thought I tried that when you pointed it out to me but I guess not. Glad you found a solution. Thanks Dave_____________________________________________ |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
floridave wrote:
This is not the xfbml version, I could not get it to work right so kept with the <iframe> version. I might be prepared to attempt this, if I had an understanding of what problems you encountered. It's been a couple of months - do you remember? U-G |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Not a clue....go for it. Dave |
|
djjoker
Joined: 2011-08-21
Posts: 3 |
![]() |
Hello, Total Novice here. I've installed the facebook like but in order for it to work I have to click it 3 times. The first 2 times it comes up with an error message: The app ID specified within the "fb:app_id" meta tag is not allowed on this domain. You must setup the Connect Base Domains for your app to be a prefix of http://solarimage.co.uk/gallery/index.php/Urban/IMG_2635_3_4_tonemapped-copy. The third time it holds. My site is www.solarimage.co.uk/gallery Could someone please point me in the right direction? I'm using Chrome as my browser. Thank you Jeremy |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Did you enter your app ID on the admin page? Dave |
|
djjoker
Joined: 2011-08-21
Posts: 3 |
![]() |
I seem to be falling short of setting the ID bit up. Can you explain what I should enter? When I have tried this I am unable to get past the first input screen. |
|
djjoker
Joined: 2011-08-21
Posts: 3 |
![]() |
Think I've got it. Thanks for coming back to me. Cheers Jer |
|
timned88
Joined: 2011-08-31
Posts: 90 |
![]() |
I keep getting this message "The app ID specified within the "fb:app_id" meta tag is not allowed on this domain. You must setup the Connect Base Domains for your app to be a prefix of ..." |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Admin -> settings -> facebook like. Dave |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
I've had this too with the appID already filled in, but it's inconsistent. I think it might be a FB server problem. U-G |
|
timned88
Joined: 2011-08-31
Posts: 90 |
![]() |
floridave wrote:
Admin -> settings -> facebook like. i have that filled in but it doesn't want to work. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Try this then http://gallery.menalto.com/forum_module_facebook_comment Dave |
|
timned88
Joined: 2011-08-31
Posts: 90 |
![]() |
that one worked right out of the box. |
|
timned88
Joined: 2011-08-31
Posts: 90 |
![]() |
now the original module appears to be working also, even though i didn't change anything. weird. |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
timned88 wrote:
now the original module appears to be working also, even though i didn't change anything. weird. Which was precisely my experience, hence my comment. U-G |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
There is something strange going on here and I don't quite understand it. I was having a problem with FB caching an outdated version of one page. This tool: http://developers.facebook.com/tools/debug will force a refresh of the cache. The tool provides a range of information about the chosen URL, and told me that the appID was wrong. It's been a while since I set this up, and I'm sure it was working initially with the appID that I used. I guess I will try to set the whole thing up again. U-G |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
OK, I've got it working. It was the appID after all. I don't know whether an incorrect one crept in to my admin settings (likely, but how?) or FB changed it (unlikely). Odd. In so doing I've managed to implement some enhancements of the module, including implementing the XFBML version!! I want to do some more testing, but hopefully I'll post it tomorrow. There is a small catch to the XFBML version: depending on where you place it, you may need some custom CSS. U-G |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Looking forward to your changes. Would be nice if you can maintain the module as well, since my time is getting scarcer and harder to find. Dave |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
Dave - I knew that you were going to say that. My time is scarce as well at the moment. I put in a burst of effort on G3 earlier this year when I switched to it, but I find it all to easy to keep fiddling with it. Photography and other responsibilities suffer when I do. I try to play with things only when I need to. I'd consider a shared role. U-G |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
I've attached V4 of this plugin. This has the following new features: 1. In the metatags that are included in page headers I've included "fb:admins" as this enables you to use insights: http://developers.facebook.com/docs/insights/ . You have to enter your numeric Facebook ID in the module's admin settings. 2. I've implemented the XFBML version of the like button. You activate this in the module's admin settings. You can choose either the old iframe or the new XFBML version. XFBML has a number of advantages: you can add a send button, there are better dialogues when you press like or send, and the like button sizes itself automatically, particularly if you enable the display of profile thumbs. But there's a catch in some situations. If you place the like button at the bottom of the album thumbs, then there is a display clipping problem when you click like or send because overflow is hidden for one of the parent divs. There isn't a perfect solution for this, yet, although you can include some custom CSS to set the overflow to auto, but it doesn't look elegant (scroll bar appears). If you want to place the like button with the album thumbs, above the thumbs is definitely better at the moment if you use the XFBML version. The iframe version is ok under the thumbs, although note the comments below about displaying profile thumbs. 3. I've added the option in admin settings for a send button next to the like button, but you only see this in your gallery if you also select XFBML. 4. I've added the option in admin settings to display the profile picture thumbs for people who have used the like button. Of course you only see these for your "friends". The XFBML version is definitely better if you enable the display of profile thumbnails, as it resizes itself depending on whether or not there are profile thumbnails to display. The iframe version can't do this, and so I've included code that increases the height of the like button if you select this option, but if there aren't any profile thumbs then there is some blank space under the like button. 5. I've corrected the metatag "og:site_name" so that it now uses the site name entered in the module's admin settings. So that's it. I need some feedback as to how this works in a range of contexts, and whether there are sizing problems. I'll need examples to look at (by PM if necessary) if there are any problems. I'm going to be on the road and/or tied up for then next two weeks, so while I hope to be able to read the forums, I can't promise to be able to diagnose or fix any issues quickly. U-G p.s. Dave - I suggest we wait for feedback before updating the attachment to the first post and the codex. I want to find a fix for that display clipping problem. |
|
OC2PS
![]()
Joined: 2010-09-08
Posts: 428 |
![]() |
Great initiative. This would be good, but it seemed to slow down the pageload for my photo pages a lot. So, can you make the Facebook Like module load after the rest of the page has loaded? Also: SoosKriszta |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Quote:
Can you add more services? http://codex.gallery2.org/Gallery3:Modules:share_bookmark http://codex.gallery2.org/Gallery3:Modules:addthis Dave |
|
OC2PS
![]()
Joined: 2010-09-08
Posts: 428 |
![]() |
I went to http://www.gallerymodules.com/ and used the codex download link to download (codex has v2 while GIT has v1). Uploaded. Installed. G3 said a modules was out of date. On update page it said installed version is 1, available is 2. I clicked Update All. Then I get an error message that the update failed and I should get the new version or deactivate module. SoosKriszta |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Version 3 is available in the first post of this thread. Dave |
|
OC2PS
![]()
Joined: 2010-09-08
Posts: 428 |
![]() |
My bad! I was referring to AddThis, not Facebook Like |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
I developed V4 of the module. If you think it's too slow to load then you can experiment with using the XFBML version of the like button, which some suggest is faster. You select which version of the like button you use in the module's admin settings. XFBML has a number of advantages (see my post above). I don't know how the get the like button to load last. You have to put the code that calls the like button at the point in the page where it is going to display, and then FB does the rest, so I can't see how to control when it loads, at least not without going to a lot of effort. Like Dave, I am not inclined to add in the other FB social modules, although I am open to persuasion in relation to comments. In my experience, getting these plugins to display properly on your page is not easy. I can foresee all sorts of issues trying to combine like and comments, especially in the sidebar. Having them as separate modules means that you can place like and comments in different places, such as like in the sidebar and comments below the thumbs or resize image. I guess the admin section could specify different locations for the two plugins, and a relative order if they are in the same location, but it would mean a complicated admin page. Having them as separate modules and if necessary controlling their order using the module that controls the order of execution of modules seems simpler. If you mean really combine them - this would have to be done by FB by creating a combined like and comments plugin. If you want to create new modules for the like box or activity feed then it would not be too hard to take V4 of this module and drop in the FB code for them, but you would need to have some understanding of G3 modules. U-G |
|
OC2PS
![]()
Joined: 2010-09-08
Posts: 428 |
![]() |
Thanks udanigaga. When I said combine, I didn't mean in the frontend. I meant, them having the same admin page...they require common things such as appid, etc. On the frontend, they could have several different boxes which could be placed in different places... SoosKriszta |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
I don't pretend to be an expert in module admin pages, but from what I've seen this isn't as easy as it seems. Each module has its own settings, so to get like and comments into the same admin page you'd have to get them into the same module, and then the issues I mentioned in my post above arise. There aren't that many settings to enter and I'm not sure that it's worth the effort to combine them just to avoid that. U-G |
|
OC2PS
![]()
Joined: 2010-09-08
Posts: 428 |
![]() |
I am not worried about admin ease-of-use - as you said, there's only a couple of settings. But as someone on shared hosting (not a very good one at that), I am thinking of performance...a single module probably means a single table is created, and needs to be accessed only once for all activated modules etc... Maybe there's a better solution.... SoosKriszta |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
I understand your concern only too well. I was on budget hosting and performance was an issue (I eventually chose to move and pay more). Based on my testing I wouldn't expect that combining these two particular modules would give you any noticeable improvements. You'd still have two separate calls to FB for the FB code and that is what will slow you down. If performance is an issue, then multiple calls to social plugins (not necessarily the same thing as multiple modules) is not a great idea IMHO. Even one is bad enough. U-G |
|
OC2PS
![]()
Joined: 2010-09-08
Posts: 428 |
![]() |
I see what you are saying. Guess I need to choose wisely. SoosKriszta |
|
OC2PS
![]()
Joined: 2010-09-08
Posts: 428 |
![]() |
@UG: I couldn't find v4. Where should I be looking? SoosKriszta |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
Attached to http://gallery.menalto.com/node/98752?page=2#comment-380592 which is further up this page. You've reminded me that I promised Dave that I'd update the codex, but I was waiting to get some feedback from people on the new version before we made V4 the new official version. So let us know what you think. U-G |
|
OC2PS
![]()
Joined: 2010-09-08
Posts: 428 |
![]() |
Installed it. Seems way faster than v3 (although, in all honesty, I checked the XFBML box). A couple of requests (really simple, somewhat superficial ones): SoosKriszta |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
Your requests might seem really simple, but you wouldn't believe how much time I've spent trying to solve both of them, without much success. 1) I've tried all my CSS tricks to try to centre the like button, but I can't. It's largely to do with the fact that the like button is actually contained in an iframe from facebook and browser security models won't let you interfere with an iframe from another domain. What I do on my site is to have some padding on the left in a custom.css style sheet. This approximately centres it. Both of these things bug me too, especially #2, so when I have more time to waste on this I will try again. Perhaps Serge can help me on #2. U-G |
|
tempg
Joined: 2005-12-17
Posts: 1857 |
![]() |
sooskriszta wrote:
2) At the moment, if I put the button below the photo then there is no space between the photo and the button. This needs fixing. (if I put the button above the photo, it appears fine, and just as it should) Is this happening with all themes? |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
I am guilty of ready sooskriszta's concern too quickly. Her concern is different to what I was expecting. You can add more vertical spacing in custom.css : The thing about the XFBML version is that it dynamically resizes itself. And when you click like and send, it pops up quite a large dialog. In at least the Greydragon theme, if the like button is under the image or thumbs, then when the dialog expands, most of it is hidden. This is because the like button is at the bottom of the g-column-centerleft DIV, which has overflow hidden. This is a harder problem to solve. You can set it to auto in custom.css, but it's not an elegant solution. sooskriszta - what happens on your site when you click like or send? Is there any clipping of the dialogs that pop-up? I'd also be interested in seeing an example in another theme. U-G Edit: It doesn't seem to be a problem in the default Wind theme, as there is sufficient space for the dialog to expand. |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
Despite saying before that I may not have time to play with this module, somehow I've created another version - version 5. I haven't included any CSS changes to deal with sooskriszta's concerns as they are Greydragon specific. It's not an issue in the default Wind theme. If you want to use this mod in Greydragon then you'll probably need some custom CSS. If you want to use the XFBML version in Greydragon then you'll almost certainly need some additional custom CSS. I am happy to advise Greydragon users on how to do this, as it's a bit site-specific. Changes in V5:
This means that there are a lot of options. I've tried to label them carefully, but you'll need to read them carefully, esp what is for the main column and what is for the sidebar. It's not easy to tweak the layout of these admin pages. Still no feedback so I'm not going to make this the official version just yet. U-G |
|
jjanule
Joined: 2011-07-10
Posts: 2 |
![]() |
I really like this module. I have only one question - when I add it to my gallery, how can I find out, who likes it? I cannot see anywhere |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
You will only ever see the names of your facebook friends who like something, plus the total number of likes. Under FB privacy settings you won't be able to see the names of people who are not your FB friends, AFAIK. To see the names of friends you need to use the standard layout, not the Button Count and Box Count layouts. Using the standard layout you can also select the admin option to display the profile pictures of FB friends who like something. Another question which you can answer is how many likes are there on my site? You can get some information on this using Facebook Insights: http://developers.facebook.com/docs/insights/ U-G @Dave: I'm about to hit the road for several weeks. I'll update the codex with info about the new version and FAQ when I return. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Quote:
I'm about to hit the road for several weeks. I'll update the codex with info about the new version and FAQ when I return. Cool! and thanks for taking this module to the next level! Dave |
|
thefuzz4
Joined: 2011-11-09
Posts: 1 |
![]() |
Hey Everyone, Just trying to get this module to work. I'm currently running version Gallery Version 3.0.2. I installed the module just like I've done for all of the others. However when I go into modules it does not show up in there. Is it not compatible with this version of Gallery? The facebook_comments module works just fine. Thank you in advance for your help with this. |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
Which version of the module are you using? It's possible that there incompatibilities with one of the earlier versions - latest is V5. I'm not aware of any incompatibilities with V5 of this module & 3.0.2. It sounds like you've placed the files in the wrong place. U-G |
|
abhijitkn
Joined: 2011-11-10
Posts: 13 |
![]() |
Hi, In 3nids theme I can not see the Facebook like button in the resized window. Any suggestions? I'm using V4 of this module. |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
I'm not familiar with this theme, and being on the road I don't have the time to understand it right now. But at a quick glance it looks to me like you're not using a conventional resize page. It looks like you're using one of those photobox overlays instead of a resize page. I don't know how to put the Facebook like button in one of them. I'd like to work out how to do it, but that isn't a priority right now. U-G |
|
abhijitkn
Joined: 2011-11-10
Posts: 13 |
![]() |
undagiga wrote:
I'm not familiar with this theme, and being on the road I don't have the time to understand it right now. But at a quick glance it looks to me like you're not using a conventional resize page. It looks like you're using one of those photobox overlays instead of a resize page. I don't know how to put the Facebook like button in one of them. I'd like to work out how to do it, but that isn't a priority right now. Hi, Thanks a lot. Please let me know once you make the changes so that I'll have the like button on re-sized page. Same is with the Facebook comments module. |
|
Rogier2712
Joined: 2011-12-28
Posts: 11 |
![]() |
Hi, I'm trying to figure out why I always get the same picture when using the Like or Send button.... can anyone help me with this? Thanks!! -edit- a little more info... the website address is: http://vansteennis.nl/g3/index.php/ When using the like or send button, I would like to select one of the thumbnails located on the left. |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
You don't say which version of the module you are using, and I can't tell from looking at your page whether it's 4 or 5. I think the behaviour you are seeing is FB using the thumb that "represents" the album. Each album has a thumb to represent it when it is displayed in its parent album. Even the root has such a thumb AFAIK, despite there being no parent. The module has some code in the header that tells facebook to use this thumb. For example, in your home page you will find the following line of code in the header:
and I think that it's this line that is telling FB which image to use. If you don't like this behaviour you could delete this line of code from the module. Or you could be sure that you have chosen the representative thumbs carefully. If you want to delete the line of code, look for "og:image" in helpers\facebook_like_theme.php and carefully delete the code. But don't delete that entire line, as you will need to keep the U-G |
|
Rogier2712
Joined: 2011-12-28
Posts: 11 |
![]() |
Thanks! I'm using version 5, but the same problem exists with version 4. I also noticed that the album thumb is used by Facebook, but I cannot select the thumb for the root album... Do you have a suggestion what code to use? Can it be a url, so I can display a logo if someone likes the root album? |
|
undagiga
Joined: 2010-11-26
Posts: 693 |
![]() |
You're right - it's harder than I thought and I'm not sure why that is, but I think that this module will enable you to do it: http://codex.gallery2.org/Gallery3:Modules:album_cover_browser Just be aware that the message you get when the module successfully assigns a thumb is incompehensible. U-G |
|