1

我正在努力解决 facebook 图像大小问题,

虽然我在 FB 上分享图像,但它只占用了小尺寸(缩略图)。即使我共享一个高分辨率图像(1600x1200 或 900x400),所有尺寸都在调整大小。

与以下代码共享。

<a class="btn" target="_blank" href="http://www.facebook.com/sharer.php?s=100&amp;p[title]=sample title&amp;p[summary]=custom summary&amp;p[url]=domainname&amp;p[images][0]=http://hidefwalls.com/wp-content/g/high-resolution/high-resolution-14-xooacj0rr2-1600x1200.jpg">share on facebook</a>

所以我的问题是有没有办法共享大图像尺寸(至少 400x209)。我关注了许多链接,但对我没有帮助。

另外请让我知道任何限制共享选项中显示的图像的选项。?

提前致谢

4

1 回答 1

2

我正在通过以下代码共享/发布。希望能帮助到你。fbImg && fbTxt 是通过 jquery 从我的站点中提取的动态图像

function publishWallPost() {
      var fbImg = $('.head .headerLeft p img')[0].src;
      var fbTxt = $('.head .headRight span.artistName').text();
      FB.ui({
          method: 'feed',
          name: 'Pandora - Which Star Are You',
          caption: 'https://www.facebook.com/pages/Pandora/119285608270259?id=119285608270259&sk=app_535647489852225',
          description: 'According to Pandora\'s Which Star Are You competition, I\'m ' + fbTxt + '. Click on the artist\'s picture to find out which star you are!',
          link: 'https://www.facebook.com/pages/Pandora/119285608270259?id=119285608270259&sk=app_535647489852225',
          picture: fbImg
        },
        function (response) {
          console.log('publishStory response: ', response);
        });
      return false;
}


window.fbAsyncInit = function () {
      FB.init({
        appId: '535647489852225',
        status: true,
        cookie: true,
        xfbml: true
      });
};

(function () {
      var e = document.createElement('script');
      e.async = true;
      e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
      document.getElementById('fb-root').appendChild(e);
}());
于 2013-11-13T04:50:56.017 回答