Class: FacebookSocialPlugins::Registration

Inherits:
SocialPlugin show all
Defined in:
lib/facebook-social_plugins/registration.rb

Instance Attribute Summary collapse

Attributes inherited from SocialPlugin

#options

Attributes inherited from UiHelper

#html, #javascript

Instance Method Summary collapse

Methods inherited from SocialPlugin

#render, #validate!

Constructor Details

#initialize(options = {}) ⇒ Registration

<fb:registration

fields="name,birthday,gender,location,email" 
redirect-uri="https://developers.facebook.com/tools/echo/"
width="530">

</fb:registration>



11
12
13
14
# File 'lib/facebook-social_plugins/registration.rb', line 11

def initialize options = {}
	super
	@named_fields = options[:fields]
end

Instance Attribute Details

#named_fieldsObject (readonly)

Returns the value of attribute named_fields.



3
4
5
# File 'lib/facebook-social_plugins/registration.rb', line 3

def named_fields
  @named_fields
end

Instance Method Details

#attributesObject

client_id Your App ID. redirect_uri The URI that will process the signed_request. It must be prefixed by your Site URL. fields Comma separated list of Named Fields, or JSON of Custom Fields. fb_only Optional. (boolean) Only allow users to register by linking their Facebook profile. Use this if you do not have your own registration system. Default: false. fb_register Optional. (boolean) Allow users to register for Facebook during the registration process. Use this if you do not have your own registration system. Default: false. width Optional. (int) The width of the iframe in pixels. If the width is < 520 the plugin will render in a small layout. border_color Optional. The border color of the plugin. target Optional. The target of the form submission: _top (default), _parent, or _self.



28
29
30
31
32
# File 'lib/facebook-social_plugins/registration.rb', line 28

def attributes
	super.merge(:client_id => :string, :redirect_uri => :string, :fields => :string, 
		:fb_only => :boolean, :fb_register => :boolean, :border_color => :string, :target => targets
	)
end

#plugin_classObject



16
17
18
# File 'lib/facebook-social_plugins/registration.rb', line 16

def plugin_class
	'fb-registration'
end

#targetsObject



34
35
36
# File 'lib/facebook-social_plugins/registration.rb', line 34

def targets
	['_top', '_parent', '_self']
end