| @@ 650-658 (lines=9) @@ | ||
| 647 | if ($postId) { |
|
| 648 | $postTarget = $sg->getPostVotePostMapper()->findById($postId); |
|
| 649 | if ($postTarget) { |
|
| 650 | foreach ($postTarget->getPostElements() as $element) { |
|
| 651 | $fbShareImage = $this->frontendUrl()->fromRoute( |
|
| 652 | '', |
|
| 653 | array(), |
|
| 654 | array('force_canonical' => true), |
|
| 655 | false |
|
| 656 | ) . $element->getValue(); |
|
| 657 | break; |
|
| 658 | } |
|
| 659 | ||
| 660 | $secretKey = strtoupper(substr(sha1(uniqid('pg_', true).'####'.time()), 0, 15)); |
|
| 661 | ||
| @@ 830-838 (lines=9) @@ | ||
| 827 | ||
| 828 | $viewModel = $this->buildView($game); |
|
| 829 | ||
| 830 | foreach ($post->getPostElements() as $element) { |
|
| 831 | $fbShareImage = $this->frontendUrl()->fromRoute( |
|
| 832 | '', |
|
| 833 | array(), |
|
| 834 | array('force_canonical' => true), |
|
| 835 | false |
|
| 836 | ) . $element->getValue(); |
|
| 837 | break; |
|
| 838 | } |
|
| 839 | ||
| 840 | $this->getViewHelper('HeadMeta')->setProperty('og:image', $fbShareImage); |
|
| 841 | ||