Reputation: 1310
I found a lot of posts, but none of them help me.
I want to share an image that is not visible. Another issue is, when I click share, all images from the page are available for sharing. How can I fix it so that only images that I want to share are visible for sharing?
I have read this Facebook Open Graph Protocol, but that didn't help me.
Here is my function to create a share button :
function WP_fb_sharer($post) {
$link = js_escape(get_permalink($post->ID));
$button = '<a name="fb_share" type="box_count" share_url="' . $link . '" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>';
$button = '
<div style="float: left; margin-left: 10px; margin-bottom: 4px;">
' . $button . '
</div>';
return $button;
}
Is there any image size limit for Facebook?
Upvotes: 0
Views: 2205
Reputation: 38135
Have a read of this answer. Facebook was recommending the use of Like Plugin instead of the Share button, and I'm just checking and the old share document is now redirecting to the Like Plugin!
So just use the Like Plugin instead.
EDIT:
If you need to attached an image, just use the og:image
meta tag and for videos use og:video
. Check the "Attaching Audio and Video Data" section.
Upvotes: 1