Facebook Page Plugin appears as link only on website

前端 未结 4 886
长发绾君心
长发绾君心 2020-12-12 05:57

I have seen similar posts, but haven\'t found an answer. I am rebuilding my website using Bootstrap and would like to add the new Page Plugin. I have followed all the instru

相关标签:
4条回答
  • 2020-12-12 06:29

    I have the same problem.

    I did like you did, included the sdk Javascript right after the body tag (and before, or on a separate javascript file, anywhere else, doesn't matter, still doesn't work!!!) and I placed the code of my plugin where I want it to appear.

    I had this error in the browser console :

    GET file://connect.facebook.net/fr_FR/sdk.js net::ERR_FILE_NOT_FOUND(anonymous function)

    So I tried to change this :

        js.src = "//connect.facebook.net/fr_FR/sdk.js#xfbml=1&version=v2.4"; 
    

    into this :

       js.src = "http://connect.facebook.net/fr_FR/sdk.js#xfbml=1&version=v2.4";
    

    The SDK now seems to load but I have a new error in the console :

    Invalid App Id: Must be a number or numeric string representing the application id. (sdk.js, line 64).

    You can still try this. Maybe it'll work for you.

    0 讨论(0)
  • 2020-12-12 06:29

    Try putting the JS code before the ending body tag as opposed to after the opening tag.

    0 讨论(0)
  • 2020-12-12 06:35

    1) put following css code, it will solve your problem

    <style type="text/css">
        .fb_iframe_widget span{        
            overflow: initial !important;
        }
        .fb_iframe_widget iframe{        
            width: 340px !important;
            height: 500px !important;    
        }
    </style>
    

    2) if you are running your website locally you have to replace

    js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.4";
    

    with

    js.src = "https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.4";
    
    0 讨论(0)
  • 2020-12-12 06:40

    It turned out that my problem was that I hadn't uploaded the site to the web. I was simply testing the site in a browser before uploading. Once I uploaded it, the plugin worked fine.

    See if that works for you!

    :) Nancy

    0 讨论(0)
提交回复
热议问题