Skip to content
Snippets Groups Projects
Commit b3e76dc1 authored by Matt Tuchfarber's avatar Matt Tuchfarber
Browse files

fix: Facebook share button on course certificates.

Facebook requires a callback when using the `.ui()` method now. I don't
know when this changed, but the share button is currently broken on
course certificates.

Facebook documentation of the `.ui()` method:
https://developers.facebook.com/docs/javascript/reference/FB.ui/
parent d7a4947e
No related branches found
No related tags found
No related merge requests found
......@@ -21,13 +21,18 @@ var FaceBook = (function() {
}(document, 'script', 'facebook-jssdk'));
},
share: function(feed_data) {
FB.ui({
method: 'feed',
name: feed_data.share_text,
link: feed_data.share_link,
picture: feed_data.picture_link,
description: feed_data.description
});
FB.ui( // eslint-disable-line no-undef
{
method: 'feed',
name: feed_data.share_text,
link: feed_data.share_link,
picture: feed_data.picture_link,
description: feed_data.description
},
// The Facebook API now requires a callback. Since we weren't doing anything after posting before,
// I'm leaving this as an empty function.
function(response) {} // eslint-disable-line no-unused-vars
);
}
};
}());
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment