Class: Faces::Providers::Facebook

Inherits:
Object
  • Object
show all
Defined in:
lib/providers/facebook.rb

Overview

Facebook class handles all Facebook based avatar methods, check the information page for more details: nickpellant.com/open-source/faces/ruby/providers/facebook

Default required methods for providers are url and/or html, exists? All other methods are at the discretion of the developer Check the provider creation guide for more details: nickpellant.com/open-source/faces/ruby/developing-providers

Instance Method Summary collapse

Instance Method Details

#exists?(identifier, configuration = {}) ⇒ Boolean

Botch job as it’s not possible to check for FBML avatar presence :(

Returns:

  • (Boolean)


31
# File 'lib/providers/facebook.rb', line 31

def exists?(identifier, configuration = {}); true; end

#html(user_id, configuration = {}) ⇒ Object

Constructs FBML tag for avatar



23
24
25
26
27
28
29
# File 'lib/providers/facebook.rb', line 23

def html(user_id, configuration = {})
  m_configuration = Faces::Common.merge_configurations([Faces::Configuration::FACEBOOK, configuration])
  fbml = '<fb:profile-pic uid="' + user_id + '" facebook-logo="' + m_configuration[:facebook_logo].to_s + '" linked="' + m_configuration[:facebook_auto_linked].to_s +
    '" size="' + size(m_configuration) + '" class="' + m_configuration[:html_classes] + ' ' + m_configuration[:html_provider_classes] + '"'
  fbml += m_configuration[:html_id] if m_configuration[:html_id].present?
  fbml += '"></fb:profile-pic>'
end

#ssl?Boolean

Doesn’t support SSL

Returns:

  • (Boolean)


33
# File 'lib/providers/facebook.rb', line 33

def ssl?; false; end