Alexey Khromov
Alexey Khromov

Reputation: 3

How to scroll Facebook page plugin from javascript

I'm developing simple site, I have facebook page plugin, like this: https://developers.facebook.com/docs/plugins/page-plugin/

(call to function 'facebook-jssdk' exists).

<div id="fb-root"></div>
    <!-- note 500px is max width of fb plugin-->
    <div class="fb-page" style="height: 1000px; width: 500px;" data-href=""
     data-tabs="timeline" data-send="false" data-height="1000" data-width="500"
     data-small-header="false" data-adapt-container-width="true"
     data-hide-cover="false" data-show-facepile="true" id="my-fb-page"></div>

I want to scroll the content inside plugin up and down in code once loaded, how do I do that?

Thanks.

Upvotes: 0

Views: 686

Answers (1)

misorude
misorude

Reputation: 3431

I want to scroll the content inside plugin up and down in code once loaded, how do I do that?

You don’t. – Because this renders as an iframe that loads its content from a different domain, so the Same Origin Policy denies any JavaScript access to it from your site.


What you want would only be possible if Facebook explicitly offered an API for this, but they don’t

Upvotes: 1

Related Questions