Conditions | 4 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
50 | public function isValid() |
||
51 | { |
||
52 | try { |
||
53 | $this->fb->get('/me'); |
||
54 | $this->error = null; |
||
55 | |||
56 | return true; |
||
57 | } catch (FacebookResponseException $e) { |
||
58 | if ($e->getErrorType() == 'OAuthException') { |
||
59 | $this->error = $e->getMessage().' Error type: '.$e->getErrorType(); |
||
60 | } else { |
||
61 | $this->error = $e->getMessage(); |
||
62 | } |
||
63 | |||
64 | return false; |
||
65 | } catch (FacebookSDKException $e) { |
||
66 | $this->error = $e->getMessage(); |
||
67 | |||
68 | return false; |
||
69 | } |
||
92 |