1 | <?php namespace Arcanedev\Socialite\OAuth\Two; |
||
11 | class FacebookProvider extends OAuthTwoProvider |
||
12 | { |
||
13 | /* ------------------------------------------------------------------------------------------------ |
||
14 | | Properties |
||
15 | | ------------------------------------------------------------------------------------------------ |
||
16 | */ |
||
17 | /** |
||
18 | * The base Facebook Graph URL. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $graphUrl = 'https://graph.facebook.com'; |
||
23 | |||
24 | /** |
||
25 | * The Graph API version for the request. |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $version = 'v2.5'; |
||
30 | |||
31 | /** |
||
32 | * The user fields being requested. |
||
33 | * |
||
34 | * @var array |
||
35 | */ |
||
36 | protected $fields = ['name', 'email', 'gender', 'verified']; |
||
37 | |||
38 | /** |
||
39 | * The scopes being requested. |
||
40 | * |
||
41 | * @var array |
||
42 | */ |
||
43 | protected $scopes = ['email']; |
||
44 | |||
45 | /** |
||
46 | * Display the dialog in a popup view. |
||
47 | * |
||
48 | * @var bool |
||
49 | */ |
||
50 | protected $popup = false; |
||
51 | |||
52 | /* ------------------------------------------------------------------------------------------------ |
||
53 | | Main Functions |
||
54 | | ------------------------------------------------------------------------------------------------ |
||
55 | */ |
||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | protected function getAuthUrl($state) |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | protected function getTokenUrl() |
||
73 | |||
74 | /** |
||
75 | * Get the access token for the given code. |
||
76 | * |
||
77 | * @param string $code |
||
78 | * |
||
79 | * @return string |
||
80 | */ |
||
81 | public function getAccessToken($code) |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | protected function parseAccessToken($body) |
||
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | protected function getUserByToken($token) |
||
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | */ |
||
118 | protected function mapUserToObject(array $user) |
||
131 | /** |
||
132 | * {@inheritdoc} |
||
133 | */ |
||
134 | protected function getCodeFields($state = null) |
||
144 | |||
145 | /** |
||
146 | * Set the user fields to request from Facebook. |
||
147 | * |
||
148 | * @param array $fields |
||
149 | * |
||
150 | * @return self |
||
151 | */ |
||
152 | public function fields(array $fields) |
||
158 | |||
159 | /** |
||
160 | * Set the dialog to be displayed as a popup. |
||
161 | * |
||
162 | * @return self |
||
163 | */ |
||
164 | public function asPopup() |
||
170 | } |
||
171 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.