0

Hello everyone
i'm developing facebook app but i want when user reach at the end of the page the content auto load from database. The only problem is that how i can check that user's reach at the end of the page with in iframe.

I have used auto load content in websites but i only want to know how we can acheive this within iframe because there is no scroll bar in facbook app.

Regards
Rizwan

2
Contributors
1
Reply
9
Views
2 Years
Discussion Span
Last Post by Masterblank
0

maybe getPageInfo function could help you?

----------------------------------
FB.Canvas.getPageInfo

Returns a Javascript object containing information about your app's canvas page. You need to provide a callback with the API, where we fetch the new value and return it.

As a Canvas app runs within an iframe it does not have access to window.innerHeight and window.innerWidth. This method exists to provide access to the client (browser) dimensions as well as the current scroll position and offset coordinates.

Example:

FB.Canvas.getPageInfo(
    function(info) {
        alert('Width: ' + info.clientWidth + ' Height: ' + info.clientHeight);
    }
);

Returns:

clientHeight (Integer) The height of the viewport in pixels

clientWidth (Integer) The width of the viewport in pixels

offsetLeft (Integer) The number of pixels between the left edge of the viewport and the left edge of your app's iframe

offsetTop (Integer) The number of pixels between the top edge of the viewport and the top edge of your app's iframe

scrollLeft (Integer) The number of pixels between the left edge of your iframe and the left edge of your iframe's viewport

scrollTop (Integer) The number of pixels between the top edge of your iframe and the top edge of your iframe's viewport

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.