Can't get plugin to work

I have used cordova-social-vk plugin for auth users through Vkontakte in ionic 1 (similar to Facebook plugin).

In ionic 1 you are installing the plugin then you can use SocialVk with methods in any controller/service like SocialVk.login(['email', 'offline'], callback ...)

Now i’m trying to configure it in ionic 2.
I have installed this plugin, but i can’t use SocialVk variable in service.
Variable methods are in plugins/cordova-social-vk/www/social-vk.js file, maybe it’s not properly written for ionic 2? Please, help!

to have ref to SocialVk you should probably declare it above the @Component like this :slight_smile:

declare var SocialVk :any

also you could try finding the plug-in in other global variables :
declare var cordova: any; declare var window: any;

1 Like

Thank you, it helped me! :slight_smile: