You are here

function dropbox_client_connect in Dropbox Client 7.4

Same name and namespace in other branches
  1. 7.3 dropbox_client.module \dropbox_client_connect()
1 string reference to 'dropbox_client_connect'
dropbox_client_menu in ./dropbox_client.module
Implements hook_menu().

File

./dropbox_client.module, line 233

Code

function dropbox_client_connect() {
  module_load_include('php', 'dropbox_client', 'oauth');
  module_load_include('php', 'dropbox_client', 'dropbox');

  //Credential for App Dropbox Client For Drupal
  $params['key'] = variable_get('dropbox_client_key', FALSE);
  $params['secret'] = variable_get('dropbox_client_secret', FALSE);
  $dropbox = new dropbox($params);
  $data = $dropbox
    ->get_request_token(url("dropbox_client/access", array(
    'absolute' => TRUE,
  )));
  $_SESSION['dropbox_client_token_secret'] = $data['token_secret'];
  drupal_goto($data['redirect']);
}