| @@ 740-759 (lines=20) @@ | ||
| 737 | return $viewModel; |
|
| 738 | } |
|
| 739 | ||
| 740 | public function fbshareAction() |
|
| 741 | { |
|
| 742 | $viewModel = new JsonModel(); |
|
| 743 | $viewModel->setTerminal(true); |
|
| 744 | $fbId = $this->params()->fromQuery('fbId'); |
|
| 745 | if (!$this->game) { |
|
| 746 | return $this->errorJson(); |
|
| 747 | } |
|
| 748 | $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user); |
|
| 749 | if (!$entry) { |
|
| 750 | return $this->errorJson(); |
|
| 751 | } |
|
| 752 | if (!$fbId) { |
|
| 753 | return $this->errorJson(); |
|
| 754 | } |
|
| 755 | ||
| 756 | $this->getGameService()->postFbWall($fbId, $this->game, $this->user, $entry); |
|
| 757 | ||
| 758 | return $this->successJson(); |
|
| 759 | } |
|
| 760 | ||
| 761 | public function fbrequestAction() |
|
| 762 | { |
|
| @@ 804-824 (lines=21) @@ | ||
| 801 | return $this->successJson(); |
|
| 802 | } |
|
| 803 | ||
| 804 | public function googleAction() |
|
| 805 | { |
|
| 806 | $viewModel = new ViewModel(); |
|
| 807 | $viewModel->setTerminal(true); |
|
| 808 | $googleId = $this->params()->fromQuery('googleId'); |
|
| 809 | ||
| 810 | if (!$this->game) { |
|
| 811 | return $this->errorJson(); |
|
| 812 | } |
|
| 813 | $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user); |
|
| 814 | if (!$entry) { |
|
| 815 | return $this->errorJson(); |
|
| 816 | } |
|
| 817 | if (!$googleId) { |
|
| 818 | return $this->errorJson(); |
|
| 819 | } |
|
| 820 | ||
| 821 | $this->getGameService()->postGoogle($googleId, $this->game, $this->user, $entry); |
|
| 822 | ||
| 823 | return $this->successJson(); |
|
| 824 | } |
|
| 825 | ||
| 826 | public function optinAction() |
|
| 827 | { |
|