Нужно сделать facebook share button. Нашёл такой код (http://www.terabug.com/publish-site-content-to-facebook-wall-publish-wall-pos...):
<div id="fb-root"></div>
<script src="https://connect.facebook.net/en_US/all.js#appId=<?php techo($facebook_info['app_id']); ?>&xfbml=1"></script>
<script>
window.fbAsyncInit = function() {
FB.init({appId: "<?php techo($facebook_info['app_id']); ?>", status: true, cookie: true, xfbml: true});
};
function streamPublish(a_name, a_caption, a_desc, a_img, a_url) {
FB.ui(
{
method: 'stream.publish',
display: 'dialog',
message: 'getting educated about Facebook Connect',
attachment: {
name: a_name,
caption: a_caption,
description: (
a_desc
),
media: [{
'type': 'image',
'src': a_img,
}],
href: a_url
},
action_links: [{
text: 'Code',
href: a_url
}],
user_message_prompt: 'Share your thoughts about Connect'
},
function (response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
}
</script>
Всё работает за единственным исключением: картинка не появляется. Подскажите знающие люди в чём дело.