| @@ 727-746 (lines=20) @@ | ||
| 724 | return $viewModel; |
|
| 725 | } |
|
| 726 | ||
| 727 | public function fbshareAction() |
|
| 728 | { |
|
| 729 | $viewModel = new JsonModel(); |
|
| 730 | $viewModel->setTerminal(true); |
|
| 731 | $fbId = $this->params()->fromQuery('fbId'); |
|
| 732 | if (!$this->game) { |
|
| 733 | return $this->errorJson(); |
|
| 734 | } |
|
| 735 | $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user); |
|
| 736 | if (!$entry) { |
|
| 737 | return $this->errorJson(); |
|
| 738 | } |
|
| 739 | if (!$fbId) { |
|
| 740 | return $this->errorJson(); |
|
| 741 | } |
|
| 742 | ||
| 743 | $this->getGameService()->postFbWall($fbId, $this->game, $this->user, $entry); |
|
| 744 | ||
| 745 | return $this->successJson(); |
|
| 746 | } |
|
| 747 | ||
| 748 | public function fbrequestAction() |
|
| 749 | { |
|
| @@ 791-811 (lines=21) @@ | ||
| 788 | return $this->successJson(); |
|
| 789 | } |
|
| 790 | ||
| 791 | public function googleAction() |
|
| 792 | { |
|
| 793 | $viewModel = new ViewModel(); |
|
| 794 | $viewModel->setTerminal(true); |
|
| 795 | $googleId = $this->params()->fromQuery('googleId'); |
|
| 796 | ||
| 797 | if (!$this->game) { |
|
| 798 | return $this->errorJson(); |
|
| 799 | } |
|
| 800 | $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user); |
|
| 801 | if (!$entry) { |
|
| 802 | return $this->errorJson(); |
|
| 803 | } |
|
| 804 | if (!$googleId) { |
|
| 805 | return $this->errorJson(); |
|
| 806 | } |
|
| 807 | ||
| 808 | $this->getGameService()->postGoogle($googleId, $this->game, $this->user, $entry); |
|
| 809 | ||
| 810 | return $this->successJson(); |
|
| 811 | } |
|
| 812 | ||
| 813 | public function optinAction() |
|
| 814 | { |
|