You are here

function fbconnect_test_fb_session in Facebook Connect 6.2

Same name and namespace in other branches
  1. 8.2 tests/fbconnect_test.module \fbconnect_test_fb_session()
  2. 7.2 tests/fbconnect_test.module \fbconnect_test_fb_session()

@todo.

1 string reference to 'fbconnect_test_fb_session'
fbconnect_test_menu in tests/fbconnect_test.module
@todo.

File

tests/fbconnect_test.module, line 24
@todo.

Code

function fbconnect_test_fb_session() {
  $form['fbuid'] = array(
    '#type' => 'textfield',
    '#title' => 'FB UID',
    '#required' => TRUE,
  );
  $form['access_token'] = array(
    '#type' => 'textfield',
    '#title' => 'Access Token',
    '#required' => TRUE,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Submit',
  );
  if ($session = fbconnect_facebook_client()
    ->getSession()) {
    $form['fbuid']['#default_value'] = $session['uid'];
    $form['access_token']['#default_value'] = $session['access_token'];
  }
  return $form;
}