You are here

function _facebook_wall_profile_picture in Facebook Wall 7

Get FB user profile picture with given FB user id.

Parameters

string $user_id: FB particular user ID.

Return value

array Merge array of FB page basic with profile picture and FALSE if it isn't.

2 calls to _facebook_wall_profile_picture()
facebook-wall.tpl.php in ./facebook-wall.tpl.php
facebook_wall_page_info in ./facebook_wall.admin.inc
Admin configure form for user Page information.

File

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

Code

function _facebook_wall_profile_picture($user_id) {

  // FB Graph API CURL calls request.
  $api_url = facebook_wall_build_picture_url($user_id);
  $profile_picture = _facebook_wall_error_msg($api_url);
  if ($profile_picture != FALSE) {
    return $profile_picture->picture->data->url;
  }
  else {
    return FALSE;
  }
}