fix: share certificate in FB#32236
Merged
cmltaWt0 merged 2 commits intoopenedx:open-release/palm.masterfrom Oct 25, 2023
Merged
fix: share certificate in FB#32236cmltaWt0 merged 2 commits intoopenedx:open-release/palm.masterfrom
cmltaWt0 merged 2 commits intoopenedx:open-release/palm.masterfrom
Conversation
Fixed the Course Card Image is absent on FB post after sharing by user. Commit for Palm release.
|
Thanks for the pull request, @DmytroAlipov! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
Contributor
|
Will merge after this lands on master. |
Contributor
Author
|
in the master was merged |
|
@e0d - is this something you can merge for us now that the master has been merged? |
|
@DmytroAlipov 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a Backport from the master branch.
Fixed an issue where the Course Card Image was missing in an FB post after a user shared it.

Description
In order to share the certificate on your Facebook page, the code was used
FaceBook.share({share_text: '${facebook_share_text | n, js_escaped_string}', share_link: '${share_url | n, js_escaped_string}', picture_link: '${full_course_image_url | n, js_escaped_string}', description: '${_('Click the link to see my certificate.') | n, js_escaped_string}'});In this case, the picture that was transmit in the picture_link parameter was ignored.
During the investigation, it was revealed that Facebook changed the rules for sharing. Meta tags must be used (follow FB rules).


After making changes to the code, the Course Card Image is displayed when you share the certificate.
In Studio:
In FB:
Sharing Debugger was used for debugging.

The default image is /static/studio/images/pencils.jpg if the course image is not loaded. Displayed as:
NOTE:
og:urlandshare_linkare the same. The "share to FB" button will not work withoutshare_link: '${share_url | n, js_escaped_string}'. But if you do not specifyog:url, the FB debugger asks you to specify the entire set of meta tags. If you do not passog:urlthere will be no errors, but I decided to do as FB recommends.