Facebook submit button disappeared after somtime

I just added the Facebook Submit plugin on my site. Everything worked perfectly, but after the Facebook submit button sometimes disappeared. When the page reloads, the submit button appears again.

Here is my code:

<div id="fb-root"></div> <div class="fb-send" data-href="http://www.google.com" ></div> <script> (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/all.js#xfbml=1&appId=519408*********"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> 

There is another problem with the Facebook upload plugin, the height and width of automatically generated tags is 1000 pixels. If I navigate the elements, this code will appear.

Here is my code:

 <iframe name="f3ff0f29fc" width="1000px" height="1000px" frameborder="0" allowtransparency="true" scrolling="no" title="fb:send Facebook Social Plugin" src="" style="border: none; visibility: visible; width: 0px; height: 0px;"></iframe> 

Does anyone know what the problem is?

+4
source share
6 answers

I agree with the other comments here, this behavior is consistent and therefore should be a feature of FB. The button disappears only when there is no input to FB.

Here are two ways to get around this problem:

1.

One way is to use the SEND button with the send attribute set to true (in HTML5 style, add the data-send="true" attribute data-send="true" ). This submit button will NOT disappear.

2.

Another way is to set the css rule as such (for HTML5 style):

div.fb-send iframe {width: 60px! important; height: 30px! important;}

Width and height can be any value you want. you can add a few more pixels for the width to accommodate a language that translates the word send to more than 4 letters.

+3
source

Add the following CSS:

 div.fb-send iframe { min-width: 59px !important; min-height: 20px !important; } 

Then add data-width = "59" data-height = "20" in the .fb-send div to set the initial height of the iframe style, avoiding the height of 1000px otherwise, which creates an invisible layer that disables the buttons below it.

 <div class="fb-send" data-width="59" data-height="20" data-href="http://example.com"></div> 
+2
source

If you look at the @Dementic link: https://developers.facebook.com/docs/reference/plugins/send/

Look at the sample button in the โ€œGet a submit buttonโ€ section, where you can tag your button. Watch this - it also disappears after 40 seconds.

I had a simulated problem with overlapping an invisible iframe, so I added the width to the specific li where I have the [send] button until I have time for further study.

I installed the [send] buttons a while ago, and everything was fine, so FB needs to change something recently.

I'm not sure why on my sites and on the facebook dev link above that the submit button disappears after 40 seconds ...

+1
source

It seems to me that you did something wrong while trying to implement the FB Send plugin. The script corrupted, and you are using an iframe , which is not supported for the submit button.

You should try creating a new file https://developers.facebook.com/docs/reference/plugins/send/

make sure you follow the instructions and copy the code correctly.

0
source

Obviously, they are not going to fix it. Many still donโ€™t know about because they almost never leave Facebook. Recommending any future links is simple and independent of the compatible Facebook code. Over the years, they have demonstrated their willingness to destroy the previous code in the name of progress. The problem is that ... everyone has no time and resources back and reprogram the same pages over and over and ...

0
source

I agree with SMedia and really believe that Iโ€™m removing all this FBook crap from my pages. No standard tags, pagination script every time and opening 1000px iframe - it's just dumbness that I don't accept!

0
source

Source: https://habr.com/ru/post/1489216/


All Articles