<commit_before>EduClever Angular 1.x social share buttons
==========================================

educ.ngSocialShare is a collection of directives which lets you share your pages. Currently Facebook, Google+ and Twitter.
These directives use alternatives to provide meta data to social networks.

You provide the look, we provide the sharing.

Licenced Under MIT Licence.

Getting Started
---------------
Install the library through bower.
```js
bower install --save educlever/ng-social-share
```
Include the script in your html file.
```html
<script src="bower_components/ng-social-share/ng-social-share.min.js"></script>
```

Add it to your module's dependencies.
```js
angular.module('myapp', ['educ.ngSocialShare']);
```

Configure the locale
```js
angular.module('myapp').config(['socialShareProvider', function(socialShareProvider) {
    // socialShareProvider.setLocale('fr_FR');
    socialShareProvider.setLocale('en_US');
});
```

These directives can use a data object provided by the controller through its $scope.
The examples bellow all use a common $scope.share object :
```js
angular.module('myapp').controller('ctrl', ['$scope', function($scope) {
    $scope.share = {
        'url': 'http://www.mywebsite/blog/#/post/1234',
        'title': 'The title of the post',
        'description': 'A summary of the post...', // 160 length max fot Twitter !
        'image': 'http://www.mywebsite/uploads/2015/03/picture.png',
        'action': 'READ'
    };
}]);
```

Sharing with Facebook
---------------------
Facebook sharing uses the Facebook API with a Facebook AppId.
Register a Facebook app and configure the AppId in the config phase of your app.
```js
angular.module('myapp').config(["socialShareProvider", function(socialShareProvider) {
    socialShareProvider.register("facebook", "YOUAPPIDHERE");
}]);
```

Then use the facebook-share directive
```html
<span data-facebook-share
      class="btn btn-primary"
      data-scrape="false"
      data-url="{{share.url}}"
      data-title="{{share.title}}"
      data-image="{{share.image}}"
      data-description="{{share.description}}"><i class="fa fa-facebook"></i></span>
```

Google +
--------
Google + sharing uses the Google interactive post API with a Google AppId.
Register a Google app and configure the AppId in the config phase of your app.
```js
angular.module('myapp').config(["socialShareProvider", function(socialShareProvider) {
    socialShareProvider.register("googleplus", "YOUAPPIDHERE");
}]);
```

Then use the googleplus-share directive
```html
<span data-googleplus-share
      class="btn btn-danger"
      data-contenturl="{{share.url}}"
      data-calltoactionlabel="{{share.action}}"
      data-calltoactionurl="{{share.url}}"
      data-prefilltext="{{share.description}}"><i class="fa fa-google-plus"></i></span>
```

Twitter
-------
Add the twitter-share directive
```html
<span data-twitter-share
      class="btn btn-default"
      data-url="{{share.url}}"
      data-text="{{share.title}}"
      data-hashtags=""
      data-size="large"><i class="fa fa-twitter"></i></span>
```<commit_msg>fix twitter example in readme<commit_after>EduClever Angular 1.x social share buttons
==========================================

educ.ngSocialShare is a collection of directives which lets you share your pages. Currently Facebook, Google+ and Twitter.
These directives use alternatives to provide meta data to social networks.

You provide the look, we provide the sharing.

Licenced Under MIT Licence.

Getting Started
---------------
Install the library through bower.
```js
bower install --save educlever/ng-social-share
```
Include the script in your html file.
```html
<script src="bower_components/ng-social-share/ng-social-share.min.js"></script>
```

Add it to your module's dependencies.
```js
angular.module('myapp', ['educ.ngSocialShare']);
```

Configure the locale
```js
angular.module('myapp').config(['socialShareProvider', function(socialShareProvider) {
    // socialShareProvider.setLocale('fr_FR');
    socialShareProvider.setLocale('en_US');
});
```

These directives can use a data object provided by the controller through its $scope.
The examples bellow all use a common $scope.share object :
```js
angular.module('myapp').controller('ctrl', ['$scope', function($scope) {
    $scope.share = {
        'url': 'http://www.mywebsite/blog/#/post/1234',
        'title': 'The title of the post',
        'description': 'A summary of the post...', // 160 length max fot Twitter !
        'image': 'http://www.mywebsite/uploads/2015/03/picture.png',
        'action': 'READ'
    };
}]);
```

Sharing with Facebook
---------------------
Facebook sharing uses the Facebook API with a Facebook AppId.
Register a Facebook app and configure the AppId in the config phase of your app.
```js
angular.module('myapp').config(["socialShareProvider", function(socialShareProvider) {
    socialShareProvider.register("facebook", "YOUAPPIDHERE");
}]);
```

Then use the facebook-share directive
```html
<span data-facebook-share
      class="btn btn-primary"
      data-scrape="false"
      data-url="{{share.url}}"
      data-title="{{share.title}}"
      data-image="{{share.image}}"
      data-description="{{share.description}}"><i class="fa fa-facebook"></i></span>
```

Google +
--------
Google + sharing uses the Google interactive post API with a Google AppId.
Register a Google app and configure the AppId in the config phase of your app.
```js
angular.module('myapp').config(["socialShareProvider", function(socialShareProvider) {
    socialShareProvider.register("googleplus", "YOUAPPIDHERE");
}]);
```

Then use the googleplus-share directive
```html
<span data-googleplus-share
      class="btn btn-danger"
      data-contenturl="{{share.url}}"
      data-calltoactionlabel="{{share.action}}"
      data-calltoactionurl="{{share.url}}"
      data-prefilltext="{{share.description}}"><i class="fa fa-google-plus"></i></span>
```

Twitter
-------
Add the twitter-share directive
```html
<span data-twitter-share
      class="btn btn-default"
      data-url="{{share.url}}"
      data-text="{{share.title}}"
      data-hashtags=""
      data-via="me"><i class="fa fa-twitter"></i></span>
```
{'fraction_non_alphanumeric': 0.17650855114553082, 'fraction_numerical': 0.00451758631816715, 'mean_word_length': 4.003228410008071, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6374718', 'n_tokens_mistral': 1843, 'n_tokens_neox': 1729, 'n_words': 506}