Reputation: 353
I followed this tutorial to add a Facebook share button on my website: Tutorial to add a Facebook share button
What I don't understand is that when I use their pictures it works like in this example:
<script type="text/javascript">
$(document).ready(function(){
$('#share_button').live('click', function(e){
e.preventDefault();
FB.ui(
{
method: 'feed',
name: 'This is the content of the "name" field.',
link: ' http://www.hyperarts.com/',
picture: 'http://www.hyperarts.com/external-xfbml/share-image.gif',
caption: 'This is the content of the "caption" field.',
description: 'This is the content of the "description" field, below the caption.',
message: 'This is text in the message box a user can add to or replace.'
});
});
});
</script>
I tried with two others pictures found on google and it works too. But now when I use pictures stored on my server it doesn't work. For example:
<script type="text/javascript">
$(document).ready(function(){
$('#share_button').click(function(e){
e.preventDefault();
FB.ui(
{
method: 'feed',
name: 'www.facebook.com propulsé par Propelink',
link: 'http://prplk.com/MTU1',
picture: 'https://www.users.prplk.com/images/profils/17_20120726190935.jpg',
caption: '',
description: '',
message: ''
});
});
});
</script>
Is underscore character not supported? Or do I have a problem with my pictures?
I hope someone could help me to resolve my problem.
Regards
Upvotes: 0
Views: 296
Reputation: 17710
Two possible problems here.
1) Image needs to be at least 50x50 (from memory) but the image you have is only 35x35
2) The hosting certificate is invalid. Not sure if this makes a difference, but if loading the larger image doesn't work, look at fixing this as well (or hosting not on https)
Edit: just seen when checking another project/bug in the Linter/Debugger that the image should be 200 x 200. Doesn't appear to be a requirement just yet, but may eventually. So another thing to watch for.
Upvotes: 1