Feed对话框不发布大图像 [英] Feed dialog doesn't publish large images

查看:114
本文介绍了Feed对话框不发布大图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过FB.ui'feed'发布到User's Wall的大图片,但帖子只像往常一样在左侧显示一个小图像。当我使用sharer.php,图像看起来很大。我需要定义以使用共享对话框发布大图像。

I'm trying to post to User's Wall large images through FB.ui 'feed' but the post only show a small image in the left side as usual. When I use the sharer.php, the image looks large. What I need to define to post large images using the Share dialog.

FB.ui({
  app_id:       '<%= ENV['FACEBOOK_APP_ID'] %>',
  method:       'feed',
  link:         '<%= request.original_url %>',
  name:         'A name example',
  redirect_uri: '<%= ENV['HOST'] %>',
  caption:      'An example caption',
  description:  'An example description',
  picture:       '<%= ENV['HOST'] %><%= asset_path "Facebook/#{params[:page]}.jpg" %>'
}, function(response){});

我已经定义了一个og:image,og:type等,但现在的方式。共享对话框只发布小图像。

I have defined an og:image, og:type, etc but now way. Share dialog only post small images.

图像是1200x603。调试器返回我的唯一警告是关于og:url。

The image are 1200x603. The only warning the debugger is returning me is about og:url.

推荐答案

这是我正好使用的:

 FB.ui({
        method: 'feed',
        link: '<url that I would like to share>',
        name: "Js name",
        picture: 'http://<domain>.com/media/images/questionnaire/1/1.jpg',
        caption: 'Js caption',
        description: 'Js description'

    }, function(response){
        console.log(response);
    });

这是我看到的:

and this is what I see:

我的链接地址的HTML中没有 og 标签。请注意使用链接属性而不是 href 属性。我花了很多小时才发现我应该使用链接属性而不是 href 属性。

There is no og tags in my link address's html. Be careful about using link attribute instead of href attribute. I spent lots of hours just for finding that I should use link attribute instead of href attribute.

这篇关于Feed对话框不发布大图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆