2017 © Pedro Peláez
 

library vk-api-client

VK API Client for PHP

image

deliciousdishes/vk-api-client

VK API Client for PHP

  • Tuesday, July 7, 2015
  • by mdimaas
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Dependency Status, (*1)

VKontakte API Client for PHP

Installation

If you're usage Composer, which we recommend, add record in your composer.json file, (*2)

{
  "require":{
    ...
    "deliciousdishes/vk-api-client": "dev-master"
    ...
  },
  "repositories":[
        ...
        {
            "type": "git",
            "url": "https://github.com/mdimaas/vk-php-api-client"
        }
        ...
  ]

}

Example usage

For get URL by authorization in VK, (*3)

$helper = new \DeliciousDishes\VKLoginHelper("http://yoursite.com", "your_app_id", "your_app_secret", array("email", ...,"offline"));
$url = $helper->getLoginUrl();

After click by link VK redirected in back with secure code in GET parameter. Now get VK session by secure code. Example:, (*4)

$helper = new \DeliciousDishes\VKLoginHelper("http://yoursite.com", "your_app_id", "your_app_secret", array("email", ...,"offline"));
$helper->getSession(); 
// or if your secure code saved in var
// $helper->getSession($secureCode); 

Session stores current user id $session->getUserId() For send request in VK API. Example get user information by ids:, (*5)

$request = new \DeliciousDishes\VKRequest($session, "users.get", array("user_ids" => $session->getUserId(),"fields" => "email,..."));
$response = $request->execute()->getResponseData();

Result query: mixed the value encoded in json in appropriate PHP type., (*6)

The Versions

07/07 2015

dev-master

9999999-dev https://github.com/mdimaas/vk-php-api-client

VK API Client for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Dmitriy Moisseyenko

api vk