简体   繁体   English

没有链接的Facebook分享对话框

[英]Facebook Share dialog without a link

It is possible to show a facebook share dialog (with javascript) without including any link. 可以显示一个不带任何链接的Facebook分享对话框(使用javascript)。 I would like to share a dynamic created image to the current users wall. 我想与当前用户共享一个动态创建的图像。

I know I can post an image through the FB.api like the following, but I would like it done in a dialog instead. 我知道我可以像下面这样通过FB.api发布图像,但是我希望它在对话框中完成。

var wallPost = {
            url: 'http://www.mypagethatgeneratestheurl.aspx',
        };
FB.api('/me/photos', 'post', wallPost , function(response) {
          if (!response || response.error) {
          debugger;
            alert('Error occured');
          } else {
            alert('Post ID: ' + response);
          }
        });

No, there is only the Feed Dialog (with custom link and picture) and the Share Dialog (with link only and the rest comes from the OG tags). 不,只有“提要”对话框(带有自定义链接和图片)和“共享”对话框(仅带有链接,其余来自OG标签)。 "Sharing" is for links only, you can´t just "Share" a picture, you have to upload it. “共享”仅用于链接,您不能仅“共享”图片,而必须上传它。 And that is only possible with the API call you posted. 只有通过您发布的API调用才能做到这一点。

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

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