I Want to Share an image (as a normal post) on FB with some caption I've used this for sharing
<script src="//connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({ appId: '660612734042393', status: true, cookie: true, xfbml: true, oauth: true });
function postToWall() {
FB.login(function(response) {
if (response.authResponse) {
FB.ui({
method: 'feed',
picture: 'http://searchengineland.com/figz/wp-content/seloads/2015/10/google-panda-name3-ss-1920-800x450.jpg',
caption: 'Checkout the image ',
description: 'Checkout the image Checkout the image Checkout the image .'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
});
} else {
//alert('User cancelled login or did not fully authorize.');
}
}, {scope: 'publish_actions,email'});
return false;
}
<a href="#" onclick="return postToWall();"><img type="button" src="../img2/shareFb.png"style="width: 109px;height: 50px;" ></a>
When I share image using this it gets shared like this
this gets shared like a link instead I want to share this image like a normal image post like we do on FB like this
I've checked on FB sdk but didn't find the exact solution for this. any help will be appreciated thanks