尝试在Facebook上上传图像时出现"(#324) Requires upload file"错误



我一直在尝试使用fb.api在Facebook上发布图像,但获取#324需要文件上传"错误。我的图像源来自URL。

我能够登录并连接到Facebook,但不能上传图像,因此appid和所有连接都已到位。

FB.api(
      "/763663567360768/photos",
      "POST",
      {
        "url": "http://sgpup.com/files/2013-07-02_00001.jpg"
      },
      function (response) {
        if (response && !response.error) {
          console.log(response);
        }
        else {
          console.log(response);
        }
      }
    );

任何帮助将不胜感激。谢谢!

没有 source参数,根据文档只有 url

https://developers.facebook.com/docs/graph-api/reference/page/photos/photos/#creating

使用使用 url 参数

发布的照片,使用Internet上的照片

编辑:您只能发布到页面,而不是用户配置文件。

相关内容

最新更新