Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 12382
Latest: ImportedPotato
New This Month: 1
New This Week: 1
New Today: 0
Stats
Total Posts: 40238
Total Topics: 7088
Most Online Today: 105
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 67
Total: 67

Author Topic: Share classifieds on facebook etc.  (Read 13513 times)

0 Members and 1 Guest are viewing this topic.

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Share classifieds on facebook etc.
« on: September 23, 2010, 06:19:24 am »
It would be nice if we could share our (or other's) classifieds listings on facebook and other sites.

For example, for facebook you just have to add the following code in function template_viewlisting(), somewhere near the button "Send to a friend" I guess:
Code: [Select]
// vkot facebook share
echo '<a name="fb_share" type="icon_link" share_url="' . $scripturl . '?action=classifieds;sa=view;id=' . $context['class_listing']['ID_LISTING']">Share on facebook</a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>';

I have already tried it, and it forms the URL correctly, but facebook recognizes the home page of my forum, I don't know why...  :-\

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15116
    • View Profile
Re: Share classifieds on facebook etc.
« Reply #1 on: September 23, 2010, 04:03:38 pm »
I can add this to the next release I believe I have this already in the gallery should be easy to add.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Share classifieds on facebook etc.
« Reply #2 on: November 04, 2010, 10:50:30 am »
I don't understand why the links of SMF Classifieds are not recognized completely by FB while all other links of the SMF forum are recognized, with their parameters.

Maybe the use of Pretty URLs would solve the problem, as you write here http://www.smfhacks.com/index.php/topic,4959.0.html but I would prefer another solution.

Please fix this. My visitors are asking to be able to share their classifieds in FB.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15116
    • View Profile
Re: Share classifieds on facebook etc.
« Reply #3 on: November 06, 2010, 01:12:04 pm »
Have you added the facebook code to the template? Or what happens with the link on facebook?
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Share classifieds on facebook etc.
« Reply #4 on: November 07, 2010, 04:38:13 am »
Yes I have tried changing the template some time ago. But even the link alone (copy-paste) is not working. For example, if you put http://forum.kithara.gr/index.php?action=classifieds;sa=view;id=18765 to facebook, it will recognize only http://forum.kithara.gr/index.php

Oh, just now I got it!.... The URL must be http://forum.kithara.gr/index.php?action=classifieds&sa=view&id=18765 and it will work! (I don't know why you are using ';' instead of '&')

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15116
    • View Profile
Re: Share classifieds on facebook etc.
« Reply #5 on: November 07, 2010, 08:09:08 am »
We use ; since that is what SMF uses for all their pages and urls as a separator.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Share classifieds on facebook etc.
« Reply #6 on: November 11, 2010, 10:15:04 am »
You are right, they use this, and it causes the same problem... :(
What can we do? at least for the classifieds.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15116
    • View Profile
Re: Share classifieds on facebook etc.
« Reply #7 on: July 10, 2011, 12:37:27 am »
For SMF Classifieds 2.0
+Added Facebook,Twitter,AddThis sharing icons on view listing page settings
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Share classifieds on facebook etc.
« Reply #8 on: October 04, 2011, 03:29:17 am »
SMF classifieds' facebook share still doesn't work (at least for me).
The link that the share button gives is, for example:
http://www.facebook.com/sharer.php?u=http%3A%2F%2Fforum.kithara.gr%2Findex.php%3Faction%3Dclassifieds%3Bsa%3Dview%3Bid%3D25022&t=cort&src=sp
(encoded and not encoded symbols together. i tried changing the &t=cort&src=sp to %3Bt%3Dcort%3Bsrc%3Dsp but doesn't work)
When it's shared on my wall and I hover over the link I see:
http://forum.kithara.gr/index.php?action=classifieds;sa=view;id=25022
but when I click it I get:
http://forum.kithara.gr/index.php?action=classifieds%3Bsa%3Dview%3Bid%3D25022
which SMF doesn't understand and so the first page of the forum is shown, and also the title and the image of the link in FB is of the first page of the forum, not of the listing.

As I wrote before, FB doesn't accept the ';' separator, but accepts the '&'. When I share manually this http://forum.kithara.gr/index.php?action=classifieds&sa=view&id=25022 then it shared OK.

Also, it's strange that I see in classifieds2.template.php:
Code: [Select]
echo '<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php?u=' . $scripturl . '?action=classifieds&sa=view&id=' . $context['class_listing']['ID_LISTING']. '&t=' . $context['class_listing']['title'] . '">' . $txt['class_txt_share'] . '</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>which has &sa=view&id= , but on the share button I get ;sa=view;id= 

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Share classifieds on facebook etc.
« Reply #9 on: October 26, 2011, 04:32:36 am »
Can anyone confirm what I write in my previous message?
At least, I want to know if it's my problem or SMFclassifieds' problem, so that I'll know what to search/edit.

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Share classifieds on facebook etc.
« Reply #10 on: November 22, 2011, 03:45:58 pm »
2.0.6
+Added facebook sharing meta data to share description,title

The new version has more about things about facebook, but still doesn't work for me.
Am I the only one with this problem or what?  :-[

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Share classifieds on facebook etc.
« Reply #11 on: January 25, 2012, 02:27:17 pm »
Can someone please reply if this feature is working or not?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15116
    • View Profile
Re: Share classifieds on facebook etc.
« Reply #12 on: January 29, 2012, 04:17:39 pm »
Made some changes to the sharing code for the next update for the 2.0.11 release looking at doing the relist feature now.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline exit

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: Share classifieds on facebook etc.
« Reply #13 on: January 30, 2012, 07:38:21 am »
Made some changes to the sharing code for the next update for the 2.0.11 release looking at doing the relist feature now.

This feature should use the "like" button instead the "share"...

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15116
    • View Profile
Re: Share classifieds on facebook etc.
« Reply #14 on: January 30, 2012, 08:08:21 am »
The share shows more information such as listing title,link and stands out more on Facebook. Like just shows a title. I could add a like link as well but the share system shows more data.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
2086 Views
Last post April 21, 2010, 01:48:12 pm
by Doughboy99
9 Replies
4542 Views
Last post September 23, 2011, 01:49:39 pm
by profsl
15 Replies
5915 Views
Last post February 04, 2012, 10:39:37 am
by SMFHacks
22 Replies
9990 Views
Last post February 05, 2014, 08:53:06 am
by SMFHacks
4 Replies
4842 Views
Last post March 03, 2014, 04:45:39 am
by Jonas1975

+- Recent Topics

Call to undefined function mysql_num_rows() by SMFHacks
July 30, 2020, 07:45:29 am

Problem with one videosite embedding by Hatshepsut
July 24, 2020, 01:25:08 am

Download System Lite by Rock Lee
June 03, 2020, 07:34:24 pm

Font question by SMFHacks
May 27, 2020, 08:15:26 am

Error message with latest SMF 2.1 Github build by Hatshepsut
May 25, 2020, 01:43:26 am

smfblog not working on 2.0.17 by tech9
May 20, 2020, 01:44:34 pm

Copyright removal by stbc
May 18, 2020, 01:27:57 am

Mod Verified User i can't square the image by Rock Lee
May 07, 2020, 07:56:10 pm

SMF4Mobile 2.0 released for SMF 2.0.x by SMFHacks
May 06, 2020, 12:13:14 pm

SMF Social Login Pro - Discontinued? by Nicole
May 02, 2020, 05:47:04 pm

Powered by EzPortal