Invalid version specified, facebook share plugin error

后端 未结 6 1291
广开言路
广开言路 2020-12-30 18:42

I want to use the facebook share plugin for the web app I am working on, I only need the basic share button. The app uses requirejs for loading javascript, so I followed the

6条回答
  •  醉梦人生
    2020-12-30 19:13

    I ran into this problem when I was changing my file from HTTP to HTTPS. The reason was the lack of specific "HTTP:" or "HTTPS:" in the following code:

    normally the '//domain.com' copies the scheme we're on, so when you're on htts://example.com a link to '//example2.com' will seen as 'https://example2.com'. For the 'fb-comments' you'll need to specifically state HTTP or HTTPS for the data-href.

    Also note that 'https://example.com' according to facebook is another page than 'http://example.com'. So if you upgrade your site for SSL you will lose all past comments if you change the URL in the social plugins from HTTP to HTTPS... The solution I chose was to use HTTP for all older posts, and HTTPS for everything recent

提交回复
热议问题