You are here

public function SimpleFbConnectFbManager::getFbProfilePicUrl in Simple FB Connect 8.3

Same name and namespace in other branches
  1. 8.2 src/SimpleFbConnectFbManager.php \Drupal\simple_fb_connect\SimpleFbConnectFbManager::getFbProfilePicUrl()

Returns the URL of user's Facebook profile picture.

Return value

string|false Absolute URL of the profile picture. False if user did not have a profile picture on FB or an error occured.

Deprecated

This method is deprecated as of 8.x-3.1 and exists only for backwards compatibility. Please use getFbProfilePic() instead.

File

src/SimpleFbConnectFbManager.php, line 271

Class

SimpleFbConnectFbManager
Contains all Simple FB Connect logic that is related to Facebook interaction.

Namespace

Drupal\simple_fb_connect

Code

public function getFbProfilePicUrl() {

  // Read the user's profile picture from Facebook API.
  if ($graph_node = $this
    ->getFbProfilePic()) {
    return $graph_node
      ->getField('url');
  }

  // Something went wrong.
  return FALSE;
}