Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. .run(function($rootScope, $location, SlidebeanUser) {
  2.  
  3. // 1) AngularJS app is now running
  4.  
  5. // 2) Initialize Parse and set the current user to the $rootScope
  6. Parse.initialize("parse app", "parse credentials");
  7.  
  8. $rootScope.sessionUser = SlidebeanUser.current();
  9.  
  10. // 3) Finally, init Facebook
  11. window.fbAsyncInit = function() {
  12. Parse.FacebookUtils.init({
  13. appId: 'facebook app id',
  14. channelUrl : '//www.slidebean.com/fbchannel.html',
  15. status: true,
  16. cookie: true,
  17. xfbml: true
  18. });
  19. };
  20. (function(d, s, id){
  21. var js, fjs = d.getElementsByTagName(s)[0];
  22. if (d.getElementById(id)) {return;}
  23. js = d.createElement(s); js.id = id;
  24. js.src = "//connect.facebook.net/en_US/all.js";
  25. fjs.parentNode.insertBefore(js, fjs);
  26. }(document, 'script', 'facebook-jssdk'));
  27. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement