Facebook link : linking to another event

  • moabi
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
13 years 4 months ago #6820 by moabi
hi,
the title talk itself,
if you "like" an event, it will link to a previous event or a wrong page with the event,

Any idea ?

Thx,

David

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #7451 by mhadmin
Replied by mhadmin on topic Re: Facebook link : linking to another event
Not sure if this is the same issue, but the Facebook sharer button on the bottom of the event page was not producing the correct link or preserving the title of the event when the URL was passed to facebook.com/sharer.php .

The problem was ampersands in the URL. Facebook's sharer.php uses the ampersand to indicted parameters as well, so it was dumping the rest of the link.

Here's my solution:

I applied the rawurlencode function to the $link variable in /components/com_eventbooking/helper/helper.php:

Change (around line 696):
Code:
function getFacebookButton( $title, $link ) { $img_url = JURI::base()."/components/com_eventbooking/assets/images/socials/facebook.png"; return '<a href="http://www.facebook.com/sharer.php?u=' . $link . '&amp;t=' . rawurlencode( $title ) . '" title="Submit ' . $title . ' in FaceBook" target="blank" > <img src="' . $img_url . '" alt="Submit ' . $title . ' in FaceBook" /> </a>' ; }

To:
Code:
function getFacebookButton( $title, $link ) { $img_url = JURI::base()."/components/com_eventbooking/assets/images/socials/facebook.png"; return '<a href="http://www.facebook.com/sharer.php?u=' . rawurlencode( $link ) . '&amp;t=' . rawurlencode( $title ) . '" title="Submit ' . $title . ' in FaceBook" target="blank" > <img src="' . $img_url . '" alt="Submit ' . $title . ' in FaceBook" /> </a>' ; }

This worked for me. Would be nice if Event Booking modified the page description in the meta tags with the event description so Facebook could pick that up as well when it scrapes the page.

Ben Cheek
MuddyHudson LLC
muddyhudson.com/consulting/web

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #7463 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Facebook link : linking to another event
Hi mhadmin

Thanks for sharing your fix . I applied the code to latest version of the extension and It is available on the download package on server .

If someone want to get this fixed without doing the upgrade, you can simply get this file, unzip it and upload to folder components/com_eventbooking/helper folder . After that, the issue will be fixed .

Thanks ,

Tuan

Attachment helper-20110209.zip not found

Attachments:

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #7464 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Facebook link : linking to another event

Would be nice if Event Booking modified the page description in the meta tags with the event description so Facebook could pick that up as well when it scrapes the page.


=> I added this to latest version of the extension , too . If you want to get this feature, simply get this file, unzip it and upload to folder components/com_eventbooking/views/event of your site . After that, It will work as expected .

Thanks,

Tuan

Attachment view-20110209.zip not found

Attachments:

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc