简体   繁体   中英

Facebook Share dialog without a link

It is possible to show a facebook share dialog (with javascript) without including any link. 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.

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). "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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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