Ignore:
Timestamp:
Jan 2, 2011, 11:49:02 AM (13 years ago)
Author:
rub
Message:

New to share link: use stream.share from the FB.ui() method of the Facebook JS SDK

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/FacebookPlug/Plugin/tpl/share.tpl

    r8436 r8439  
    88*}
    99{* method 2 *}
     10{*
    1011<a href="http://www.facebook.com/sharer.php?u={$fbp_page.url|@urlencode}" title="{'Share on Facebook'|@translate}" rel="nofollow" onclick="window.open(this.href, 'Facebook','width=550,height=350,location=no,status=no,toolbar=no,scrollbars=no,menubar=no'); return false;"><img src="{$FBP_PATH|@cat:'/icon/share.png'}" class="button" alt="{'Share on Facebook'|@translate}"></a>
    11 {* method 2 *}
    12 {* TODO Try with UI *}
     12*}
     13{* method 3 *}
     14<a href="{$fbp_page.url}" title="{'Share on Facebook'|@translate}" rel="nofollow"  onclick="share(this.href); return false;"><img src="{$FBP_PATH|@cat:'/icon/share.png'}" class="button" alt="{'Share on Facebook'|@translate}"></a>
     15{literal}
     16<script type="text/javascript">
     17  //stream share method
     18  function share(href)
     19  {
     20    FB.ui({method: 'stream.share', u: href});
     21  }
     22</script>
     23{/literal}
    1324{if $FBP_SHARE_LI}</li>{/if}
Note: See TracChangeset for help on using the changeset viewer.