Skip to content

fix: share certificate in FB#32236

Merged
cmltaWt0 merged 2 commits intoopenedx:open-release/palm.masterfrom
DmytroAlipov:fix-FB-share-Palm
Oct 25, 2023
Merged

fix: share certificate in FB#32236
cmltaWt0 merged 2 commits intoopenedx:open-release/palm.masterfrom
DmytroAlipov:fix-FB-share-Palm

Conversation

@DmytroAlipov
Copy link
Contributor

@DmytroAlipov DmytroAlipov commented May 15, 2023

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.
vanilla-1

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:
vanilla-4
In FB:
vanilla-5

Sharing Debugger was used for debugging.
The default image is /static/studio/images/pencils.jpg if the course image is not loaded. Displayed as:
vanilla-6

NOTE: og:url and share_link are the same. The "share to FB" button will not work without share_link: '${share_url | n, js_escaped_string}'. But if you do not specify og:url, the FB debugger asks you to specify the entire set of meta tags. If you do not pass og:url there will be no errors, but I decided to do as FB recommends.

Fixed the Course Card Image is absent on FB post
after sharing by user. Commit for Palm release.
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label May 15, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented May 15, 2023

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:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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.

@e0d
Copy link
Contributor

e0d commented May 18, 2023

Will merge after this lands on master.

@DmytroAlipov
Copy link
Contributor Author

in the master was merged

@mphilbrick211
Copy link

@e0d - is this something you can merge for us now that the master has been merged?

@cmltaWt0 cmltaWt0 merged commit 6517d84 into openedx:open-release/palm.master Oct 25, 2023
@openedx-webhooks
Copy link

@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.

@DmytroAlipov DmytroAlipov deleted the fix-FB-share-Palm branch October 25, 2023 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants