简体   繁体   English

Facebook Feed对话框共享dataURL

[英]facebook feed dialog share dataURL

I would like for the user to share client side image on facebook with the feed dialog or other approach 我希望用户通过供稿对话框或其他方法在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);}); 

Its not working with the dataURL standard, is there another way to do this (graph api?), it must be possible to share dynamically created images that are not held on the server? 它与dataURL标准不dataURL ,还有另一种方法(图形api?),必须可以共享未保存在服务器上的动态创建的图像吗?

The error I got was: 我得到的错误是:

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 

When trying with image/jpeg;base64 , I get the following error: 当尝试使用image/jpeg;base64 ,出现以下错误:

Could not find callback 1

As far as I know, it's not possible. 据我所知,这是不可能的。 When you share something in the feed, Facebook needs to be able to fetch the image from a public URL. 当您在Feed中共享内容时,Facebook需要能够从公共URL提取图像。

picture : The URL of a picture attached to this post. picture :此帖子所附图片网址

Source: Feed and Share Dialogs 来源:“ 提要和共享”对话框

You need to upload the image somewhere first (for instance Amazon S3 ). 您需要先将图像上传到某处(例如Amazon S3 )。

您可以将画布图像上传到保管箱,然后在Facebook提要URL中使用生成的url-使用画布中的数据将图像保存到保管箱

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM