Fix missing fblike button in blog#821
Conversation
|
Deploy preview for docusaurus-preview ready! Built with commit 68c0fa6 |
yangshun
left a comment
There was a problem hiding this comment.
Thanks for fixing something I broke 😅
| } | ||
|
|
||
| .fbLike { | ||
| .fb-like { |
There was a problem hiding this comment.
Could you add a comment here that we shouldn't change this class because it's determined by FB SDK?
There was a problem hiding this comment.
I think it should be in the js ? the css here just add extra style
There was a problem hiding this comment.
Yes but I renamed it thinking it was our own styling 😥
There was a problem hiding this comment.
Ah sure, let's write it in the JS then.
lib/core/BlogPostLayout.js
Outdated
| <div className="blogSocialSectionItem"> | ||
| <div | ||
| className="fb-comments" | ||
| className="fb-comments" // Facebook SDK require it to be 'fb-comments' |
There was a problem hiding this comment.
Please make sure this doesn't show up in the output. I don't remember being able to write comments in JSX like that. I had to do
{ /* Facebook SDK require it to be 'fb-comments */ }
There was a problem hiding this comment.
ah that's true. I almost forgot 😢
| } | ||
|
|
||
| .fbLike { | ||
| .fb-like { |
There was a problem hiding this comment.
Ah sure, let's write it in the JS then.
|
I don't think the likes will be lost. Likes don't work that way 🤔 If I'm not wrong, I think the like button paths were not correctly configured in the past, and they were not post-specific. The buttons on all the posts were pointing to the same path. |
|
I think the like buttons were pointing to a Dev version maybe. Maybe I am the only one in the world who saw hundreds of likes on the announcement blog post 🤣 Sent with GitHawk |
|
Nope, I saw it too (940+ likes). Actually, I just saw it 5 mins ago while fiddling with the config trying to find the right config for it. But I changed something and am unable to get back that state. Good news is it's definitely there, bad news is I need more time to find it back 😞 |
|
I got it. It had to be non-HTTPS URL and using the HTTPS has it HTTP doesn't have it Play around with the URL http://docusaurus.io/blog/2017/12/14/introducing-docusaurus.html on https://developers.facebook.com/docs/plugins/like-button/ Now that we have changed to clean URLs we probably can't get back to that state too 😥 cc @endiliey |
|
We can point to the html version if we want even in clean url setting. |
It'll affect end users unless we add another config? But then again, not too keen on adding more configs.
Weird though, not sure how the HTTP version got so many likes when we were on HTTPS the whole time. |
Hmm lets leave it then.
I think when they first launched it's still on http, just like when jest first changed to jestjs.io its still http Or .. it points to the wrong one before |


Motivation
Fix #814
It should be
According to https://developers.facebook.com/docs/plugins/like-button/
Instead of
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Related PRs
#757 renamed "fb-like" to "fbLike"