| @@ 753-772 (lines=20) @@ | ||
| 750 | return $viewModel; |
|
| 751 | } |
|
| 752 | ||
| 753 | public function fbshareAction() |
|
| 754 | { |
|
| 755 | $viewModel = new JsonModel(); |
|
| 756 | $viewModel->setTerminal(true); |
|
| 757 | $fbId = $this->params()->fromQuery('fbId'); |
|
| 758 | if (!$this->game) { |
|
| 759 | return $this->errorJson(); |
|
| 760 | } |
|
| 761 | $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user); |
|
| 762 | if (!$entry) { |
|
| 763 | return $this->errorJson(); |
|
| 764 | } |
|
| 765 | if (!$fbId) { |
|
| 766 | return $this->errorJson(); |
|
| 767 | } |
|
| 768 | ||
| 769 | $this->getGameService()->postFbWall($fbId, $this->game, $this->user, $entry); |
|
| 770 | ||
| 771 | return $this->successJson(); |
|
| 772 | } |
|
| 773 | ||
| 774 | public function fbrequestAction() |
|
| 775 | { |
|
| @@ 817-837 (lines=21) @@ | ||
| 814 | return $this->successJson(); |
|
| 815 | } |
|
| 816 | ||
| 817 | public function googleAction() |
|
| 818 | { |
|
| 819 | $viewModel = new ViewModel(); |
|
| 820 | $viewModel->setTerminal(true); |
|
| 821 | $googleId = $this->params()->fromQuery('googleId'); |
|
| 822 | ||
| 823 | if (!$this->game) { |
|
| 824 | return $this->errorJson(); |
|
| 825 | } |
|
| 826 | $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user); |
|
| 827 | if (!$entry) { |
|
| 828 | return $this->errorJson(); |
|
| 829 | } |
|
| 830 | if (!$googleId) { |
|
| 831 | return $this->errorJson(); |
|
| 832 | } |
|
| 833 | ||
| 834 | $this->getGameService()->postGoogle($googleId, $this->game, $this->user, $entry); |
|
| 835 | ||
| 836 | return $this->successJson(); |
|
| 837 | } |
|
| 838 | ||
| 839 | public function optinAction() |
|
| 840 | { |
|