2

I ever used login with accounts-facebook with Meteor, but it stopped working without changing anything.

Here a snippet from my login code:

static Facebook() {

    if(Meteor.user()) {
      Meteor.call('permissionsServicesController', 'facebook');
    }

    if (Meteor.isCordova) {
      facebookConnectPlugin.login(
        ['email'],
        function () {
          console.log('success');
        },
        function () {
          console.log('error');
        }
      );
    }
    else {
      Meteor.loginWithFacebook({
        loginStyle: 'redirect',
        requestPermissions: ['email', 'publish_actions', 'user_about_me', 'user_birthday', 'user_education_history', 'user_friends', 'user_likes', 'user_location',
        'user_photos', 'user_posts', 'user_relationships', 'user_religion_politics', 'user_videos', 'user_website', 'user_work_history',
        'manage_pages', 'publish_pages']
      }, function (e) {

        if (e) console.log('Error at loginWithFacebook',e);

      });
    }
  }

And the message I'm receiving from terminal:

Exception while invoking method 'login' Error: Failed to complete OAuth handshake with Facebook.

I'm using:

  • accounts-facebook@1.0.1
  • Meteor 1.4.1.1

I already tried to take out the authorization account from facebook, check all the permissions, etc.

Anyone can help me?

Felipe Augusto
  • 7,733
  • 10
  • 39
  • 73
  • 1
    so while the cause may be the same, the solution is probably different for the tech stack. i feel this isn't a true duplicate. – zim Mar 28 '17 at 17:08
  • if anyone doesn't want to do a full meteor update, there is this package which will provide a workaround until you are ready. we just deployed this to prod and it's working: https://github.com/fede-rodes/facebook-accounts-patched – zim Mar 28 '17 at 17:09

1 Answers1

2

I had a similar issue recently. Check is your accounts-facebook package version.

According to Facebook Graph API Changelog, version 2.2 would be available until March 25th. (https://developers.facebook.com/docs/apps/changelog)

Update your accounts-facebook atmosphere package by running meteor update and this will make sure that your authentication process is using a recent version of the Graph API.

That should fix your OAuth handshake problem.

Brunno Vodola Martins
  • 1,582
  • 2
  • 15
  • 17