SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 24, 2012, 08:59:05 pm

Login with username, password and session length
Members
Total Members: 10071
Latest: cdavidson012
Stats
Total Posts: 28687
Total Topics: 4977
Online Today: 94
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 49
Total: 49
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
| | | | |-+ 
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: [1] 2 Go Down Print
Author Topic: Share classifieds on facebook etc.  (Read 2867 times)
vkot
SMF Classifieds Customer
Full Member
*****
Offline Offline

Posts: 123


View Profile
« 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:
// 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...  Undecided
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« 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.
Logged
vkot
SMF Classifieds Customer
Full Member
*****
Offline Offline

Posts: 123


View Profile
« 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.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« 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?
Logged
vkot
SMF Classifieds Customer
Full Member
*****
Offline Offline

Posts: 123


View Profile
« 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 '&')
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« 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.
Logged
vkot
SMF Classifieds Customer
Full Member
*****
Offline Offline

Posts: 123


View Profile
« Reply #6 on: November 11, 2010, 10:15:04 am »

You are right, they use this, and it causes the same problem... Sad
What can we do? at least for the classifieds.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« 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
Logged
vkot
SMF Classifieds Customer
Full Member
*****
Offline Offline

Posts: 123


View Profile
« 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:
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= 
Logged
vkot
SMF Classifieds Customer
Full Member
*****
Offline Offline

Posts: 123


View Profile
« 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.
Logged
vkot
SMF Classifieds Customer
Full Member
*****
Offline Offline

Posts: 123


View Profile
« 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?  Embarrassed
Logged
vkot
SMF Classifieds Customer
Full Member
*****
Offline Offline

Posts: 123


View Profile
« Reply #11 on: January 25, 2012, 02:27:17 pm »

Can someone please reply if this feature is working or not?
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« 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.
Logged
exit
SMF Classifieds Customer
Jr. Member
*****
Offline Offline

Posts: 62


View Profile
« 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"...
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« 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.
Logged
Pages: [1] 2 Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 08:02:50 am]

[Today at 04:11:41 am]

[May 21, 2012, 08:54:11 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]

[May 17, 2012, 06:07:46 pm]

[May 17, 2012, 02:22:07 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 4.786 seconds with 20 queries.