Skip to content

Commit

Permalink
Version 1.1.0
Browse files Browse the repository at this point in the history
- Removing deprecated plugins
- Adding ngView to example (Ref issue #4)
- Changed version of Facebook SDK: v2.3 -> v2.9.
- Changed angular version: 1.4.4 -> 1.6.4.
  • Loading branch information
wlepinski committed May 12, 2017
1 parent 27087da commit 66d3537
Show file tree
Hide file tree
Showing 15 changed files with 102 additions and 384 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules/
_site/
bower_components/
npm-debug.log
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module.exports = function (grunt) {
example: {
options: {
port: 9001,
base: ['example', 'dist', 'node_modules'],
base: ['example', 'dist', 'bower_components', 'node_modules'],
keepalive: true,
middleware: function (connect, options) {
var middlewares = [];
Expand Down
7 changes: 5 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"name": "angularjs-facebook-sdk",
"version": "1.0.8",
"version": "1.1.0",
"main": "dist/angularjs-facebook-sdk.js",
"moduleType": [
"global"
],
"dependencies": {
"jquery": "~2.1.0",
"angular": "~1.4.4"
"angular": "~1.6.4",
"highlightjs": "^9.10.0",
"cssreset": "^1.0.0",
"angular-route": "1.6.4"
},
"ignore": [
"bower_components",
Expand Down
119 changes: 1 addition & 118 deletions dist/angularjs-facebook-sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,6 @@ angular.module('angularjs-facebook-sdk').run(['facebookConfig',
}
}
]);
function FacebookActivityDirective(facebookService) {
return {
restrict: 'E',
replace: true,
template: '<fb:activity ng-attr-app-id ng-attr-site ng-attr-action ng-attr-colorscheme ng-attr-header></fb:activity>',
scope: {
appId: '@appId',
site: '@site',
action: '@action',
colorschema: '@colorschema',
header: '@header'
},
link: function (scope, element) {
facebookService.ready.then(function () {
FB.XFBML.parse(element[0]);
});
}
};
}

FacebookActivityDirective.$inject = ['facebookService'];

angular.module('angularjs-facebook-sdk.directives')
.directive('afbActivity', FacebookActivityDirective);
function FacebookCommentsDirective(facebookService) {
return {
restrict: 'E',
Expand Down Expand Up @@ -98,33 +74,6 @@ FacebookCommentsDirective.$inject = ['facebookService'];

angular.module('angularjs-facebook-sdk.directives')
.directive('afbComments', FacebookCommentsDirective);
function FacebookFacepileDirective(facebookService) {
return {
restrict: 'E',
replace: true,
template: '<fb:facepile ng-attr-href ng-attr-action ng-attr-width ng-attr-max-rows ng-attr-colorscheme ng-attr-size ng-attr-show-count></fb:facepile>',
scope: {
href: '@href',
action: '@action',
colorschema: '@colorschema',
showCount: '@showCount',
height: '@height',
width: '@width',
maxRows: '@maxRows',
size: '@size'
},
link: function (scope, element) {
facebookService.ready.then(function () {
FB.XFBML.parse(element[0]);
});
}
};
}

FacebookFacepileDirective.$inject = ['facebookService'];

angular.module('angularjs-facebook-sdk.directives')
.directive('afbFacepile', FacebookFacepileDirective);
function FacebookFollowDirective(facebookService) {
return {
restrict: 'E',
Expand Down Expand Up @@ -197,31 +146,6 @@ FacebookLikeDirective.$inject = ['facebookService'];

angular.module('angularjs-facebook-sdk.directives')
.directive('afbLike', FacebookLikeDirective);
function FacebookLikeboxDirective(facebookService) {
return {
restrict: 'E',
replace: true,
template: '<fb:like-box ng-attr-href ng-attr-colorscheme ng-attr-show-faces ng-attr-header ng-attr-stream ng-attr-show-border></fb:like-box>',
scope: {
href: '@href',
colorschema: '@colorschema',
showFaces: '@showFaces',
header: '@header',
stream: '@stream',
showBorder: '@showBorder'
},
link: function (scope, element) {
facebookService.ready.then(function () {
FB.XFBML.parse(element[0]);
});
}
};
}

FacebookLikeboxDirective.$inject = ['facebookService'];

angular.module('angularjs-facebook-sdk.directives')
.directive('afbLikeBox', FacebookLikeboxDirective);
function FacebookLoginDirective(facebookService) {
return {
restrict: 'E',
Expand Down Expand Up @@ -279,47 +203,6 @@ FacebookLogoutDirective.$inject = ['facebookService'];

angular.module('angularjs-facebook-sdk.directives')
.directive('afbLogout', FacebookLogoutDirective);
function FacebookNameDirective(facebookService) {
return {
restrict: 'E',
replace: true,
template: '<fb:name ng-attr-uid></fb:name>',
scope: {
uid: '@uid'
},
link: function (scope, element) {
facebookService.ready.then(function () {
FB.XFBML.parse(element[0]);
});
}
};
}

FacebookNameDirective.$inject = ['facebookService'];

angular.module('angularjs-facebook-sdk.directives')
.directive('afbName', FacebookNameDirective);
function FacebookPostDirective(facebookService) {
return {
restrict: 'E',
replace: true,
template: '<fb:post ng-attr-href ng-attr-width></fb:post>',
scope: {
href: '@href',
width: '@width'
},
link: function (scope, element) {
facebookService.ready.then(function () {
FB.XFBML.parse(element[0]);
});
}
};
}

FacebookPostDirective.$inject = ['facebookService'];

angular.module('angularjs-facebook-sdk.directives')
.directive('afbPost', FacebookPostDirective);
function FacebookProfilePicDirective(facebookService) {
return {
restrict: 'E',
Expand Down Expand Up @@ -419,7 +302,7 @@ angular.module('angularjs-facebook-sdk.directives')
angular.module('angularjs-facebook-sdk.services')
.provider('facebookConfig', function () {
var _appId = null;
var _sdkVersion = 'v2.2';
var _sdkVersion = 'v2.9';
var _userOptions = {};
var _langCode = 'en_US';
var _debug = false;
Expand Down
4 changes: 2 additions & 2 deletions dist/angularjs-facebook-sdk.min.js

Large diffs are not rendered by default.

19 changes: 6 additions & 13 deletions example/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
angular.module('app', ['angularjs-facebook-sdk'])
.config(function facebookConfig(facebookConfigProvider) {
angular.module('app', ['angularjs-facebook-sdk', 'ngRoute'])
.config(function facebookConfig(facebookConfigProvider, $routeProvider) {
facebookConfigProvider.setAppId(394254447322921);
facebookConfigProvider.setOptions({ status: false });
$routeProvider.when('/', {
templateUrl: 'home.html',
controller: 'ComponentsController'
})
})
.run(function (facebookConfig, facebookService) {
facebookService.ready.then(function () {
Expand Down Expand Up @@ -50,17 +54,6 @@ angular.module('app', ['angularjs-facebook-sdk'])
console.log('onMessageSend', arguments);
}
})
.directive('test', function () {
return {
restrict: 'E',
scope: {
edgeCreated: '&onEdgeCreated'
},
link: function (scope, element) {
scope.edgeCreated({ url: 'Test' });
}
}
})
.directive('component', function ($compile, $sce) {
return {
restrict: 'E',
Expand Down
70 changes: 70 additions & 0 deletions example/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<div class="components" ng-controller="ComponentsController as c">
<h1>Documentation: angularjs.facebook.sdk</h1>
<component name="afb:send">
<data>
<component:declaration ng-non-bindable>
<afb:send href="https://github.com/wlepinski/angularjs-facebook-sdk" on-message-send="onMessageSend(url);"></afb:send>
</component:declaration>
</data>
</component>

<component name="afb:profile:pic">
<data>
<component:declaration ng-non-bindable>
<afb:profile:pic type="square" width="40" height="40" uid="577763696"></afb:profile:pic>
</component:declaration>
</data>
</component>

<component name="afb:login">
<data>
<component:declaration ng-non-bindable>
<afb:login label="Login" scope="email, read_stream, read_friendlists, user_actions.video"></afb:login>
</component:declaration>
</data>
</component>

<component name="afb:logout">
<data>
<component:declaration ng-non-bindable>
<afb:logout label="Logout"></afb:logout>
</component:declaration>
</data>
</component>

<component name="afb:like">
<data>
<component:declaration ng-non-bindable>
<afb:like href="https://github.com/wlepinski/angularjs-facebook-sdk" layout="button_count" action="like" show-faces="true"
share="false" on-edge-created="onEdgeCreated(url);" on-edge-removed="onEdgeRemoved(url);"></afb:like>
</component:declaration>
</data>
</component>

<component name="afb:share">
<data>
<component:declaration ng-non-bindable>
<afb:share:button href="https://github.com/wlepinski/angularjs-facebook-sdk" type="button_count"></afb:share:button>
</component:declaration>
</data>
</component>

<component name="afb:follow">
<data>
<component:declaration ng-non-bindable>
<afb:follow href="http://www.facebook.com/zuck" colorscheme="light" layout="standard" show-faces="true"></afb:follow>
</component:declaration>
</data>
</component>

<component name="afb:comments">
<data>
<component:declaration ng-non-bindable>
<afb:comments href="https://github.com/wlepinski/angularjs-facebook-sdk" numposts="5" colorscheme="light" on-comment-created="onCommentCreated(href, commentID, parentCommentID);"
on-comment-removed="onCommentRemoved(href, commentID, parentCommentID);">
</afb:comments>
</component:declaration>
</data>
</component>

</div>
Loading

0 comments on commit 66d3537

Please sign in to comment.