You are loading the facebook SDK when you click the button and that's the wrong way to load it, change your script to this:
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '42352352356463', // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/pt_PT/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
function shareFB(){
var obj = {
method: 'feed',
name: 'name',
caption: 'caption',
description: 'description',
link: 'http://www.image.com/',
picture: 'http://www.image.com/static/3.png'
};
function share(response){
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
FB.ui(obj, share);
};
</script>