user3305711
user3305711

Reputation: 451

Facebook fb-page plugin not working in webpage

The fb-page plugin doesn't work. My Fb-Page is set to public. Other fb-plugins work fine. No browser console errors.

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    </head>
    <body>
        <div id="fb-root"></div>
        <div class="fb-page" data-href="https://www.facebook.com/individualdiaet/" data-width="180" data-height="70" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"></div>
            <script>
          window.fbAsyncInit = function() {
            FB.init({
              appId      : '1410540785669628',
              xfbml      : true,
              version    : 'v2.8'
            });
            FB.AppEvents.logPageView();
          };

          (function(d, s, id){
             var js, fjs = d.getElementsByTagName(s)[0];
             if (d.getElementById(id)) {return;}
             js = d.createElement(s); js.id = id;
             js.src = "//connect.facebook.net/en_US/sdk.js";
             fjs.parentNode.insertBefore(js, fjs);
           }(document, 'script', 'facebook-jssdk'));
        </script>
    </body>
</html>

The plugin gets redered, but it seems to size 0.

I never had problems with this. Any ideas?

Upvotes: 0

Views: 2137

Answers (1)

Izaid Sanchez
Izaid Sanchez

Reputation: 28

I had the same problem, it's because your Facebook Page have already some restrictions configured (country, age... whatever).

Facebook says that the social page plugin no works if are a restricted page. (https://developers.facebook.com/docs/plugins/page-plugin#privacy)

So you can try removing all restrictions in your Facebook Page and create the social page plugin again.

Upvotes: 1

Related Questions