forked from digitick/yii-faceplugs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Registration.php
64 lines (60 loc) · 1.48 KB
/
Registration.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* Wrappers for facebook plugins.
* @copyright © Digitick <www.digitick.net> 2011
* @license GNU Lesser General Public License v3.0
* @author Ianaré Sévi
*/
require_once 'EFaceplugsAppLink.php';
/**
* The registration plugin allows users to easily sign up for your website with
* their Facebook account.
*
* @see http://developers.facebook.com/docs/plugins/registration
*/
class Registration extends EFaceplugsAppLink
{
/**
* If the user arrives logged into Facebook, but has not registered for
* your site, the button will say Register and clicking it will take the
* user to your registration-url.
* @var string
*/
public $registration_url;
/**
* The URI that will process the signed_request. It must be prefixed by
* your Site URL.
* @var string
*/
public $redirect_uri;
/**
* Comma separated list of Named Fields, or JSON of Custom Fields.
* @var string
*/
public $fields;
/**
* Only allow users to register by linking their Facebook profile.
*
* Use this if you do not have your own registration system. Default: false.
* @var boolean
*/
public $fb_only;
/**
* The width in pixels. If the width is < 520 the plugin will
* render in a small layout.
* @var integer
*/
public $width;
/**
*
* @var integer
*/
public $client_id;
public function run()
{
parent::run();
$this->client_id = $this->app_id;
$params = $this->getParams();
echo CHtml::openTag('fb:registration', $params), CHtml::closeTag('fb:registration');
}
}