Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .run(function($rootScope, $location, SlidebeanUser) {
- // 1) AngularJS app is now running
- // 2) Initialize Parse and set the current user to the $rootScope
- Parse.initialize("parse app", "parse credentials");
- $rootScope.sessionUser = SlidebeanUser.current();
- // 3) Finally, init Facebook
- window.fbAsyncInit = function() {
- Parse.FacebookUtils.init({
- appId: 'facebook app id',
- channelUrl : '//www.slidebean.com/fbchannel.html',
- status: true,
- cookie: true,
- xfbml: true
- });
- };
- (function(d, s, id){
- var js, fjs = d.getElementsByTagName(s)[0];
- if (d.getElementById(id)) {return;}
- js = d.createElement(s); js.id = id;
- js.src = "//connect.facebook.net/en_US/all.js";
- fjs.parentNode.insertBefore(js, fjs);
- }(document, 'script', 'facebook-jssdk'));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement