12
Cửa sổ bật lên FB sharer hiển thị dữ liệu của trang, không phải siêu dữ liệu tôi đã chèn vào liên kết php.facebook Cửa sổ bật lên Sharer
<a href="http://www.facebook.com/sharer/sharer.php?s=100&p%5Btitle%5D=Google&p%5Burl%5D=http%3A%2F%2Fwww.google.com&p%5Bsummary%5D=Google search engine&p%5Bimages%5D%5B0%5D=https://www.google.com/images/srpr/logo3w.png
"onClick="return fbs_click(626, 305)" target="_blank" title="Share">FACEBOOK</a>
Có vẻ như là do javascript
<script type="text/javascript">
function fbs_click(width, height) {
var leftPosition, topPosition;
leftPosition = (window.screen.width/2) - ((width/2) + 10);
topPosition = (window.screen.height/2) - ((height/2) + 50);
var windowFeatures = "status=no,height=" + height + ",width=" + width + ",resizable=no,left=" + leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY=" + topPosition + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no";
u=location.href;
t=document.title;
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer', windowFeatures);
return false;
}
</script>
Làm thế nào tôi có thể hiển thị các dữ liệu chính xác trong cửa sổ popup?
hoàn hảo, cảm ơn bạn :) ngay bây giờ nếu tôi chỉ có thể có cửa sổ bật lên ở giữa trang thay vì góc trên bên trái .. – no0ne
@ThomasBLund xem câu trả lời đã chỉnh sửa của tôi, mọi thứ hoạt động tốt :) – Stichoza
đây là tiếp tục (và giải pháp) cho câu hỏi khác của tôi về "thẻ og-meta cho một số nút chia sẻ" - http://stackoverflow.com/questions/14818698/open-graph-meta-tags-for-several-share-buttons - cảm ơn bạn Stichoza – no0ne