Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/473.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript fb.api中的图片参数未显示_Javascript_Facebook_Facebook Graph Api_Facebook Javascript Sdk - Fatal编程技术网

Javascript fb.api中的图片参数未显示

Javascript fb.api中的图片参数未显示,javascript,facebook,facebook-graph-api,facebook-javascript-sdk,Javascript,Facebook,Facebook Graph Api,Facebook Javascript Sdk,我一直试图在Facebook的这篇测试帖子上展示这张图片,但没有效果。请检查我的密码。图像/图片是存在的,因为它是我在这里的化身 function PostTest() { FB.api('/me/feed', 'post', { message: "This is the test message!", source: 'http://www.test.com', link: 'http://www.test.com',

我一直试图在Facebook的这篇测试帖子上展示这张图片,但没有效果。请检查我的密码。图像/图片是存在的,因为它是我在这里的化身

function PostTest() {
    FB.api('/me/feed', 'post', {
        message: "This is the test message!",
        source: 'http://www.test.com',
        link: 'http://www.test.com',
        picture: 'https://www.gravatar.com/avatar/dd703fc997aba7a8a8abc60f2613e570?s=128&d=identicon&r=PG&f=1'
    }, function (response) {
        if (response && response.id) {
            alert('success');
        } else if (response && response.error && 200 == response.error.code) {
        alert('error');
        }
    });
}
这是调用后的结果

报纸上说-

图片必须至少为200px x 200px

你的照片是128x128


希望这会有所帮助。祝你好运

我试着照你说的做,但还是不起作用。无论如何,谢谢。你能给出新图片的url吗?图片是在我尝试使用Graph API Explorer时发布的。所以请再试一次。。我还通过在fb.api调用中添加url属性修复了它。我将url和图片值设置为相同。然后它终于显示出来了!:)