Jump to:

10989 Posts in 2726 Topics by 1817 members

All other Modules

SilverStripe Forums » All other Modules » ShareThis module with Facebook?

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2305 Views
  • Optimuz
    Avatar
    Community Member
    1 Post

    ShareThis module with Facebook? Link to this post

    Hi I'm new to the forums, and I'm also new to the whole silverstripe programming. I don't have much of a PHP knowledge, and I've been trying to get the facebook share working on the sharethis module.

    I've managed to get it working by editing the config file in the ShareThis module:

       "facebook"=> array(    
                "url"=>"http://www.facebook.com/sharer.php?" .htmlentities("u=$page_url&title=$page_title&"),
                "title" => "Facebook"),

    But the advice I need is how do I make it perform like the coding facebook has given below:

    <script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank">Share on Facebook</a>

    I've been trying to work on this for 12 hours, and I'm lost on how to input the java to open in a new window. I'm only good at html, but as far as PHP knowledge it's pretty bad. So if anyone would like to help me it would be much appreciated.

    Thanks!

  • TotalNet
    Avatar
    Community Member
    181 Posts

    Re: ShareThis module with Facebook? Link to this post

    I was searching the forum to find anyone who has used this module, did you get it working?
    I'm using a free bit of code from www.addthis.com put in page.ss but don't really like using a third party to do this. Will have a go with Share This on my dev server in a bit but would like to hear from anyone who's using it.

    Cheers,

    Rich

    2305 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.