| @@ 642-650 (lines=9) @@ | ||
| 639 | if ($postId) { |
|
| 640 | $postTarget = $sg->getPostVotePostMapper()->findById($postId); |
|
| 641 | if ($postTarget) { |
|
| 642 | foreach ($postTarget->getPostElements() as $element) { |
|
| 643 | $fbShareImage = $this->frontendUrl()->fromRoute( |
|
| 644 | '', |
|
| 645 | array(), |
|
| 646 | array('force_canonical' => true), |
|
| 647 | false |
|
| 648 | ) . $element->getValue(); |
|
| 649 | break; |
|
| 650 | } |
|
| 651 | ||
| 652 | $secretKey = strtoupper(substr(sha1(uniqid('pg_', true).'####'.time()), 0, 15)); |
|
| 653 | ||
| @@ 838-846 (lines=9) @@ | ||
| 835 | ||
| 836 | $viewModel = $this->buildView($game); |
|
| 837 | ||
| 838 | foreach ($post->getPostElements() as $element) { |
|
| 839 | $fbShareImage = $this->frontendUrl()->fromRoute( |
|
| 840 | '', |
|
| 841 | array(), |
|
| 842 | array('force_canonical' => true), |
|
| 843 | false |
|
| 844 | ) . $element->getValue(); |
|
| 845 | break; |
|
| 846 | } |
|
| 847 | ||
| 848 | $this->getViewHelper('HeadMeta')->setProperty('og:image', $fbShareImage); |
|
| 849 | ||