开发者

facebook page iframe tab - form is not appearing

开发者 https://www.devze.com 2023-04-12 18:08 出处:网络
I have a form on a facebook page.seen here:http://o开发者_如何学Cn.fb.me/ocsqMR It is an iframe tab but the form at the bottom is not rendering.When using IE8 or 9, the form does not appear.When usin

I have a form on a facebook page. seen here: http://o开发者_如何学Cn.fb.me/ocsqMR

It is an iframe tab but the form at the bottom is not rendering. When using IE8 or 9, the form does not appear. When using chrome, firefox, or safari, the form does appear. Using chrome I can see it when I do inspect element but it's there but not visible.

facebook page iframe tab - form is not appearing

Ideas?


Looking at the source code for your page you need to make a few changes and additions.

Make sure you declare a DOCTYPE for the page. http://www.w3.org/QA/2002/04/valid-dtd-list.html

Next, remove the onLoad attribute from the body tag:

<Body onLoad="FB.Canvas.setSize({width: 515, height: 1350})"><Div id="fb-root"></div>`

And also, you'll need to update this code: Make sure you're using the app ID from https://developers.facebook.com/apps for your app. You'll also want to make sure the OAuth attribute is in your call.

<Script src="http://connect.facebook.net/en_US/all.js#xfbml=1″></script>
<Script type="text/javascript">
FB.init({
appId: FB_APP_ID,Status: true,Cookie: true,Xfbml: true
});
window.fbAsyncInit = function().{
fb.canvas.setautoresize();
}
</Script>

Here is an example of how it should look:

<script type="text/javascript">
  window.fbAsyncInit = function() {
    FB.init({appId: 'PUT THE APP ID FROM https://developers.facebook.com/apps HERE',
 status: true, cookie: true,
             xfbml: true, oauth: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</script>
<script type="text/javascript">
        window.fbAsyncInit = function() {
        FB.Canvas.setAutoResize();
}
</script>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号