How to sync accounts-facebook with facebook sdk?

I’m using the accounts-facebook package to login with facebook, but I also want to use the facebook sdk

https://developers.facebook.com/docs/javascript/quickstart/v2.4

// initialize facebook client javascript sdk
if (Meteor.isClient) {
  window.fbAsyncInit = function() {
    FB.init({
      appId      : facebook.appId,
      xfbml      : true,
      version    : facebook.version
    });
  };

  (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/sdk.js";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));
}

The problem is getting the facebook sdk to recognize that the user is already logged in without having two popup windows. Any ideas?

1 Like

Hmm so it seems, I can just use the Meteor HTTP package for all the graph api stuff… Maybe I wont use this at all…

+1 for any solutions of this problem.

Use the facebook api.