我希望用户通过 feed 对话框或其他方法在 Facebook 上共享客户端图像
FB.ui({ method: 'feed',
caption: 'Mega Tangram Picture',
message: 'I made this tangram picture on MegaTangram',
picture: canvas.toDataURL("image/png;base64;")
}, function(response){console.log(response);});
它不符合dataURL
标准,是否有另一种方法可以做到这一点(图形API?),必须可以共享未保存在服务器上的动态创建的图像?
我得到的错误是:
An error occurred. Please try again later.
API Error Code: 100
API Error Description: Invalid parameter
Error Message: picture URL is not properly formatted
checkupdatefeed result parameter= undefined script.js:1183
checkupdatefeed result parameter= 1390679958266:9.4.0
尝试使用 image/jpeg;base64
时,出现以下错误:
Could not find callback 1
最佳答案
据我所知,这是不可能的。当您在 Feed 中分享某些内容时,Facebook 需要能够从公共(public) URL 获取图像。
picture: The URL of a picture attached to this post.
您需要先将图像上传到某个位置(例如 Amazon S3 )。
关于javascript - Facebook feed 对话框共享 dataURL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21366883/