Reviewed & tested by the community
Project:
Facebook social plugins integration
Version:
7.x-2.0-beta4
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Jan 2012 at 23:25 UTC
Updated:
19 May 2013 at 21:24 UTC
Jump to comment: Most recent file
Comments
Comment #1
MrGeek commentedi second this - but it has to look nice..
I've restored to hacking my own universal "like" into my theme.
Comment #2
mxtMaybe we can simply add an option to provide a fixed "data-href" (that in most cases, will be the website URL) within the Fb plugin attributes in the LIKE button preset.
If this option is filled, the module will print the fixed entry as value in the "data-href" attribute, and not the current complete url where the user is navigating.
What do you think?
Comment #3
janton commentedYes.. this is what i was looking for, can't we provide the "URL to Like"
simular to the normal facebook like creator: http://developers.facebook.com/docs/reference/plugins/like/
For example if i want the users to Like my Facebook Page i need to fill in my Facebook page:
http://www.facebook.com/CompanyName
unfortunally this it not done yet? i believe this is "data-href" yes..
Comment #4
janton commentedI just did a small hack in like.inc (*i have drupal 6 development version)
add this line below line 41
Now i could specify a link :)
Comment #5
janton commentedI tested it, it works if you don't fill in any url (then is just used the url as before) and if you type a URL it will use that one.
Perhaps this can be patched in the d7 and d6 version? Needs review!
Comment #6
parvell commentedI need this feature too. Subscribe
Comment #7
andershal commentedHere is a patch for 7.x-2.x
Comment #8
ellen.davis commentedPatch worked for me.
Comment #9
faizan_abid commentedPatch works.
http://www.lifeinsingapore.com.sg
Comment #10
summit commentedGreetings, Martijn
Comment #11
dbassendine commentedAllowing the existing Like block to reference a fixed URL will be useful. However this approach doesn't really fit my use case or the one described in the issue - that is, to have a like button for each page and one in the header that references the site's main URL or FB page. I'd argue this is the most common use case.
To this end, I've cloned the existing Like module and stripped it down to the very basics to provide a secondary Like button that can be used alongside the existing page-by-page one (fb_social_like_sitewide module, admin: admin/settings/fb/social/likesitewide). The client project this is for was using 6.x-1.x so this is a bit behind the times but hopefully a similar approach could be used in 6.x-2.x and 7.x-2.x.
Hope this helps - David
Comment #12
loparr commentedpatch from #works. Thank you
@dbassendine I think that patch from #7 is enough for you. In your case, you can create 2 plugins using like button - one with empty field for url - that would be for liking every specific page and second plugin would be with your fb fan page. Each plugin can create blocks so you can position it anywhere.