@@ 779-798 (lines=20) @@ | ||
776 | return $viewModel; |
|
777 | } |
|
778 | ||
779 | public function fbshareAction() |
|
780 | { |
|
781 | $viewModel = new JsonModel(); |
|
782 | $viewModel->setTerminal(true); |
|
783 | $fbId = $this->params()->fromQuery('fbId'); |
|
784 | if (!$this->game) { |
|
785 | return $this->errorJson(); |
|
786 | } |
|
787 | $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user); |
|
788 | if (!$entry) { |
|
789 | return $this->errorJson(); |
|
790 | } |
|
791 | if (!$fbId) { |
|
792 | return $this->errorJson(); |
|
793 | } |
|
794 | ||
795 | $this->getGameService()->postFbWall($fbId, $this->game, $this->user, $entry); |
|
796 | ||
797 | return $this->successJson(); |
|
798 | } |
|
799 | ||
800 | public function fbrequestAction() |
|
801 | { |
|
@@ 843-863 (lines=21) @@ | ||
840 | return $this->successJson(); |
|
841 | } |
|
842 | ||
843 | public function googleAction() |
|
844 | { |
|
845 | $viewModel = new ViewModel(); |
|
846 | $viewModel->setTerminal(true); |
|
847 | $googleId = $this->params()->fromQuery('googleId'); |
|
848 | ||
849 | if (!$this->game) { |
|
850 | return $this->errorJson(); |
|
851 | } |
|
852 | $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user); |
|
853 | if (!$entry) { |
|
854 | return $this->errorJson(); |
|
855 | } |
|
856 | if (!$googleId) { |
|
857 | return $this->errorJson(); |
|
858 | } |
|
859 | ||
860 | $this->getGameService()->postGoogle($googleId, $this->game, $this->user, $entry); |
|
861 | ||
862 | return $this->successJson(); |
|
863 | } |
|
864 | ||
865 | public function optinAction() |
|
866 | { |