Scrolling JS SDK for Facebook

I have some simple codes that scroll up to the animation by clicking on each link that contains the "top" class and some other codes that I use to go to a specific id div.

But when I remove the vertical scrollbar on the pages of the facebook application by adding FB.Canvas.setAutoGrow (); as well as FB.Canvas.setSize (); this piece of code no longer works on the facebook application page, and I cannot scroll up and down. I searched and it seems to us that we should use the FB.Canvas.scrollTo from the Facebook JS SDK.

By the way, as far as I'm trying to do this, it seems I can’t do this. If anyone can guide me in this regard, I will be so grateful.

+4
source share
2 answers

In the setting, it should be set to liquid. also just use setAutoGrow () should be enough.

Please note that FB.Canvas.scrollTo and FB.Canvas.setSize only work at a fixed screen height, so you can control the size of the canvas and find the user wherever you want. In fact, FB.Canvas.scrollTo does not work in Fluid mode! btw, if you plan to use a fixed height, it is useful to control the screening of the change in height as follows:

$(window).resize(function() { scrHeight = $(window).height(); // now you can use FB.Canvas.scrollTo and FB.Canvas.setSize // here to satisfy your purposes }); 
+1
source

In the settings of your FB application, you have:

 Canvas Width:Fluid Fixed (760px) Canvas Height: Fluid Fixed at X px 

check if fluid height is selected

0
source

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


All Articles