This commit is contained in:
Harry Bomrah 2014-02-21 18:38:29 +08:00
parent 8306511819
commit 62fbcee0f0
1 changed files with 2 additions and 1 deletions

View File

@ -46,7 +46,8 @@
<script type="text/javascript"> <script type="text/javascript">
(function(){ (function(){
$(".fb-share-button").click(function(){ $(".fb-share-button").click(function(){
var url = "https://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent("<%= @bulletin.title %>") + "&u=" +encodeURIComponent("<%= request.url %>"); var img = "<%= @bulletin.image.url rescue '' %>",
url = "https://www.facebook.com/sharer/sharer.php?s=100&p[title]=<%= @bulletin.title %>&p[images][0]=" + img + "+&p[url]=<%= request.url %>");
newwindow = window.open(url,'name','height=500,width=1024'); newwindow = window.open(url,'name','height=500,width=1024');
if (window.focus) {newwindow.focus()} if (window.focus) {newwindow.focus()}
return false; return false;