Facebook Page Plugin appears as link only on websi

2019-01-20 18:32发布

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 instructions, inserting the Javascript code after the opening tag and inserting the other code into my web page. All that appears on my webpage is a link that reads "KMC Marine", which DOES go to my Facebook page, but no other plugin data appears.

Any suggestions would be greatly appreciated.

4条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-01-20 18:59

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.

查看更多
淡お忘
3楼-- · 2019-01-20 19:11

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

查看更多
你好瞎i
4楼-- · 2019-01-20 19:14

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

查看更多
一纸荒年 Trace。
5楼-- · 2019-01-20 19:19

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";
查看更多
登录 后发表回答