| @@ 656-664 (lines=9) @@ | ||
| 653 | if ($postId) { |
|
| 654 | $postTarget = $sg->getPostVotePostMapper()->findById($postId); |
|
| 655 | if ($postTarget) { |
|
| 656 | foreach ($postTarget->getPostElements() as $element) { |
|
| 657 | $fbShareImage = $this->frontendUrl()->fromRoute( |
|
| 658 | '', |
|
| 659 | array(), |
|
| 660 | array('force_canonical' => true), |
|
| 661 | false |
|
| 662 | ) . $element->getValue(); |
|
| 663 | break; |
|
| 664 | } |
|
| 665 | ||
| 666 | $secretKey = strtoupper(substr(sha1(uniqid('pg_', true).'####'.time()), 0, 15)); |
|
| 667 | ||
| @@ 855-863 (lines=9) @@ | ||
| 852 | ||
| 853 | $viewModel = $this->buildView($game); |
|
| 854 | ||
| 855 | foreach ($post->getPostElements() as $element) { |
|
| 856 | $fbShareImage = $this->frontendUrl()->fromRoute( |
|
| 857 | '', |
|
| 858 | array(), |
|
| 859 | array('force_canonical' => true), |
|
| 860 | false |
|
| 861 | ) . $element->getValue(); |
|
| 862 | break; |
|
| 863 | } |
|
| 864 | ||
| 865 | $this->getViewHelper('HeadMeta')->setProperty('og:image', $fbShareImage); |
|
| 866 | ||