Latest 0.0.3
Homepage https://github.com/VictorAmelin/StfalconSocial
License MIT
Platforms ios 9.0, requires ARC
Dependencies FBSDKCoreKit, FBSDKLoginKit, VK-ios-sdk
Authors

StfalconSocial`s purpose is to get access token from Facebook or VK. You can use it to get token from specific social network, or from several (now supports only Facebook and VKontakte).

How to use:

For Facebook:

  • add this three methods to your AppDelegate:

1). func appFBDidFinishLaunchingWithOptions(application: UIApplication, launchOptions: [UIApplicationLaunchOptionsKey: Any]?)

2). func appFBOpenURL(app: UIApplication, url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:])

3). func appFBDidBecomeActive()

For VK:

  • add this method to your AppDelegate:

1). func appVKOpenURL(sourceApplication: String?, url: URL)

Then in ViewController (for example) use:

StfalconSocial.sharedInstance.requestVKToken(permissions: ["friends", "photos"], appId: "your app id") { (token, error) in
        if error == nil {
            print("TOKEN: (token)")
        } else {
            print("ERROR: (error?.localizedDescription)")
        }
    }

Don`t forget to add all FacebookAppID and VKontakteAppID into Info.plist and:

    <key>LSApplicationQueriesSchemes</key> 

    <array>       

      <string>fbapi</string>

    <string>fb-messenger-api</string>

      <string>fbauth2</string>

      <string>fbshareextension</string>

      <string>vk</string>

      <string>vk-share</string>

      <string>vkauthorize</string>

  </array>

Also don`t forget to add URL Types in Info section.

Latest podspec

{
    "name": "StfalconSocial",
    "version": "0.0.3",
    "summary": "StfalconSocial helps you to get access token from Facebook and VK.",
    "description": "StfalconSocial`s purpose is to get access token from Facebook or VK. You can use it to get token from specific social network, or from several (now supports only Facebook and VKontakte).",
    "homepage": "https://github.com/VictorAmelin/StfalconSocial",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Viktor Amelin": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3.0"
    },
    "source": {
        "git": "https://github.com/VictorAmelin/StfalconSocial.git",
        "tag": "0.0.3"
    },
    "source_files": "StfalconSocial.{swift}",
    "dependencies": {
        "FBSDKCoreKit": [],
        "FBSDKLoginKit": [],
        "VK-ios-sdk": []
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This