angular-facebook icon indicating copy to clipboard operation
angular-facebook copied to clipboard

SDK Version

Open tgwhite opened this issue 9 years ago • 1 comments

I'm entirely new to the Facebook API and I thought I would give this module a shot for easier integration with the SDK.

I noticed that the SDK is currently >= 2.4 and I didn't see anything in example usage that indicated and SDK version parameter so I took a look at the source at it looks like it's hard coded to v2.0.

Is this likely to cause any problems? Can this be generalized to use the latest SDK version or at least accept a parameter that allows one to choose?

From dist/angular-facebook.js:

 /**
         * SDK version
         */
        settings.version = 'v2.0';

        this.setSdkVersion = function(version) {
          settings.version = version;
        };

        this.getSdkVersion = function() {
          return settings.version;
        };

tgwhite avatar Nov 02 '15 21:11 tgwhite

You can set SDK version like this.

angular.module('app')
    .config(function config(FacebookProvider) {
        FacebookProvider.init('000000000000000');
        FacebookProvider.setSdkVersion('v2.5');
    })

I came here to say, that 2.0 version actually did not work for me at all, so the default value better be updated.

Yurko-Fedoriv avatar Mar 11 '16 07:03 Yurko-Fedoriv