
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ngOpenFB is an Angular module that lets you integrate your Angular or Ionic application with Facebook
ngOpenFB is an angular module that lets you integrate your JavaScript application with Facebook. Original idea is from the OpenFB library by Christophe Coenraets rewritten for a better usage with Ionic and with Promise support.
ngOpenFB works for both browser-based angular apps and ionic apps. There is no dependency on the Facebook SDK!
bower install ngOpenFB
cordova plugin add cordova-plugin-inappbrowser
angular.module('<YOUR_APP>', ['ngOpenFB'])
$openFB.init( {appId: '<YOUR_APP_ID>'} );
Initializes the ngOpenFB module. You must use this function and initializes the module with an appId before you can use any other function.
======
Checks if the user has logged in with ngOpenFB and currently has a session api token.
======
Login to Facebook using OAuth. If running in a Browser, the OAuth workflow happens in a a popup window. If running in Cordova container, it happens using the In App Browser Plugin.
======
Lets you make any Facebook Graph API request.
======
De-authorize the app
Check Login status:
$openFB.isLoggedIn()
.then(function( loginStatus ) {
// logged in
} , function( err ) {
// not logged in
});
======
Login using Facebook:
$openFB.login({scope: 'email,user_friends'})
.then(function( token ) {
// log in successful
// send token to your server
}, function( err ) {
// error logging in
});
======
Fetch user's profile and profile picture:
var me = {};
$openFB.api({path: '/me'})
.then(function( res ) {
angular.extend(me, res);
, function( err ) {
// error
});
$openFB.api({
path: '/me/picture',
params: {
redirect: false,
height: 64,
width: 64
}
}).then(function( res ) {
angular.extend(me, {picture: res.data.url});
});
======
Post on the user's feed:
$openFB.api({
method: 'POST',
path: '/me/feed',
params: {
message: 'Testing the Facebook Graph API'
}, function( err, result ) {
// Handle response from this callback
}
});
======
Using a different url for your login callback:
$openFB.init({
appId : '<YOUR_APP_ID>'
browserOauthCallback : <PATH_TO_YOUR_HOST> + '/oauthcallback.html'
cordovaOauthCallback : <PATH_TO_YOUR_OTHER_HOST> + '/login_success.html'
})
ngOpenFB is licensed under the MIT Open Source license. For more information, see the LICENSE file in this repository.
FAQs
ngOpenFB is an Angular module that lets you integrate your Angular or Ionic application with Facebook
We found that ng-open-fb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.