npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-vk

v1.0.1

Published

cordova/phonegap adapter for vksdk. iOS 9 compatible

Downloads

8

Readme

Cordova VK social network plugin

cordova/phonegap adapter for vksdk. iOS 9 compatible

You can use this plugin to authenticate user via VK application rather than via webview. It makes use of official VkSDKs for iOS and Android. This project is based on another github project https://github.com/DrMoriarty/cordova-social-vk . But Api was made a bit more generic to fit our needs.

Installation and Setup

First, you need to create VK application on developer page: https://vk.com/apps?act=manage

Android

cordova plugin add cordova-vk

Official VK documentation of how to setup and app is located here: https://vk.com/dev/android_sdk . Fill in Fill in the "Batch name for Android", "Main Activity for Android" and "Certificate fingerprint for Android" fields. To generate fingerprint once android app is installed and running you can use VkSdk.getFingerPrintVkSdk method like this: VkSdk.getFingerPrintVkSdk(function(fpt) { alert(fpt); });

iOS

cordova plugin add cordova-vk --variable VK_APP_ID=vk123456

Where vk123456 is unique identificator of your application, which you can see in your app settings: https://vk.com/editapp?id=123456 . Please note, that vk prefix should also be presented. This is needed to setup callback url scheme, so that VK application can open yours.

Sample usage

Upon your application startup you need to call VkSdk.init method with your APP id as an argument.

VkSdk.init('123456');

To initiate login process, you should call VkSdk.initiateLogin method:

VkSdk.initiateLogin(['photos', 'offline']);

As per SDKs' architecture receiving token is an event, rather than callback, you need to listen to vkSdk.newToken event to understand, when your user was logged in:

document.addEventListener('vkSdk.newToken', function(token) {
  console.log('New token is ' + token);
});

Important notes

Library is not complete. If you need bindings for some particular methods, create PRs or Issues. Thanks for your cooperation.

License

MIT