I follow this post to deploy facebook share botton in my app http://www.hyperarts.com/blog/tutorial-how-to-add-facebook-share-button-to-your-web-site-pages/
The firs
Here's also a directive built based on Chickenrice's answer.
Html:
Directive:
'use strict';
/* global FB */
myApp.directive('fbShare', [
function() {
return {
restrict: 'A',
link: function(scope, element) {
element.on('click', function() {
FB.ui({
method: 'feed',
name: 'Name you want to show',
link: 'http://link-you-want-to-show',
picture: 'http://picture-you-want-to-show',
caption: 'Caption you want to show',
description: 'Description you want to show',
message: 'Message you want to show'
});
});
}
};
}
]);
If you use jshint (you should) the /* global FB */ part is there in so you don't get undefined variable warning.