You are here

function _facebook_wall_theme_html_content in Facebook Wall 7

Generate HTML content from template file.

Parameters

string $api_url: FB graph api url with access token and fields.

Return value

array Array of FB content on success data fetch and FALSE if it isn't.

3 calls to _facebook_wall_theme_html_content()
facebook_wall_block_view in ./facebook_wall.module
Implements hook_block_view().
facebook_wall_display_posts in ./facebook_wall.pages.inc
Facebook wall post content fetcher.
_facebook_wall_ajax_next_wall_post in ./facebook_wall.pages.inc
Ajax call to get older FB wall posts.

File

./facebook_wall.module, line 305
Get the current facebook wall posts of the given user or page.

Code

function _facebook_wall_theme_html_content($api_url) {

  // Contains FB current wall post.
  $wall_post = _facebook_wall_error_msg($api_url);
  if ($wall_post != FALSE && isset($wall_post->data[0])) {
    variable_set('facebook_wall_post_pagging_next', $wall_post->paging->next);

    // Contains FB user basic informaion.
    $basic_page = _facebook_wall_page_info_array();
    if ($basic_page != FALSE) {

      // Sending two FB array to template file.
      return theme('facebook_wall', array(
        'facebook_wall' => $wall_post,
        'facebook_page' => $basic_page,
      ));
    }
  }
  else {
    return FALSE;
  }
}