Sam
Sam

Reputation: 105

Modify FB page plugin on my website

Hi Happy New Year and thanks in advance for your time..

So im using Facebook javascript SDK to display my FB page on my site. Its showing up as expected. Good.

Now I want to alter the Fb page title after it has loaded in my site. I tried getElementByClassName in javascript. But no effect(may be because of iframe?). This is the actual picthis is the present site

And this is what i desire modified by chrome dev tools-- the fb page plug-in title has been changed.

Is it possible to achive this??

Upvotes: 0

Views: 76

Answers (2)

Sam
Sam

Reputation: 105

Finally found a work around for the requirement. It is not possible to modify the page Pugin but -

  • use php sdk to initialise Facebook and
  • Use open graph to fetch the posts.
  • Now you can use this data as you like

By this method even individual posts can be tailored accordingly. A working example is at - http://callmenick.com/post/displaying-a-custom-facebook-page-feed

Upvotes: 0

C3roe
C3roe

Reputation: 96306

No, it is not possible.

The iframe content is from a different domain, and therefor the Same Origin Policy prevents you from accessing its content via JavaScript from your site.

Upvotes: 1

Related Questions