First of all, thanks for a great module and API for interaction with the Graph API.

Im having a annoying problem which concerns the redirect after approving Facebook the defined permissions.

To start with Im just testing if Im actually retrieving any data from the Graph API.

The code looks like (all in same module):

/**
 * Implements hook_form_FORM_ID_alter();
 */
function report_form_report_node_form_alter(&$form, &$form_state, $form_id) {
  $form['#submit'][] = 'report_form_report_node_form_submit';
}

/** * Implements hook_fboauth_actions(). */ 
function report_fboauth_actions() {
  $actions['report_post_import'] = array(
    'title' => t('Import Facebook Posts'),
    'callback' => 'report_fboauth_action_post_import',
    'permissions' => array(
      'user_photos', // Gets access to a user's photos. 
      'email',
    ),
  );
  return $actions;
}

/** * Facebook OAuth action callback; Import a user's Facebook photos. */
function report_fboauth_action_post_import($app_id, $access_token) {
  $result = fboauth_graph_query('me/photos', $access_token);

  // show the access-token
  dpm($access_token);

// Optionally set a completion or error message. 
  drupal_set_message(t('Import complete!'));
  //return 'some-path-after-action';
}

function report_form_report_node_form_submit($form, &$form_state) {
  // Extract the link from a given fboauth action. 
  $fb_link = fboauth_action_link_properties('report_fboauth_action_post_import');
// Extract the request url from a given fboauth action link, including the query parameters. 
  $fb_query_url = url($fb_link['href'], array('absolute' => TRUE, 'query' => $fb_link['query']));
// Redirect user to facebook for authorization. 
   drupal_goto($fb_query_url);
}

The error Im getting is:

The requested page "/fboauth/report_fboauth_action_post_import?code=AQDOe3_0_GKyKzFzoY2OSfuB7hoQHJnk2cgEXoQO8Wf8RUxBt0z7no0TLibJk-DtVPJZW9K5RXTOLqeL6bRiKztwqVqWFn9pGC_LlKJV5VuHQZ29_dWJsMcVMrnOguKwTZH4wPGpRY79CjwNahPEYzUKGw_Z892JM0XDZPv6VaO7rly_O0B3xXxRHV3q2AHvVIHg7sg4UIGQIs_J2dDLpPd6_b4gQ7EOsws7IZ-OLFWvEs0u2ScZ-KD5ai3InGhwa14MW7AVgyG74mAqwzUwbON5DCcAzyyl1FUQR5SLXgzNMkKwqWW7ismAQNKBECAUaeg" could not be found.

Hope someone can help me in the right direction.