从JavaScript SDK共享图像不会加载图像?

时间:2013-05-10 07:11:25

标签: javascript facebook sdk share feed

这是非常简单的代码:

            var obj = {
                method: "feed",
                link: share_url,
                picture: share_url,
                name: "test name",
                caption: "test caption",
                description: "Using Dialogs to interact with users."
            };
            function callback(response) {
                console.log(response);
            }
            FB.ui(obj, callback);

share_url是这样的:

http://www.majorforms.com/thumbnail.php?width=1200&height=1200&image=1033/4f/4f313dee7641ba3add3ac080f451277a9af9f0cc.jpg

事情就是帖子写在我的墙上,但图像不存在!即使我为“链接”和“图片”提供了相同的URL。那是为什么?

1 个答案:

答案 0 :(得分:2)

这是答案。如果我省略图片参数,那么一切正常! E.g。

        var obj = {
            method: "feed",
            link: share_url,
            name: "test name",
            caption: "test caption",
            description: "Using Dialogs to interact with users."
        };
        function callback(response) {
            console.log(response);
        }
        FB.ui(obj, callback);

我不知道为什么,但事实就是如此。