-2

I would like to fill the TextArea of a Facebook Comment Plugin so that after it loads it will display my text inside the textArea.

The HTML code for the comment is

  <div class="fb-comments facebook" data-href="https://www.facebook.com/RighToDignity"
     data-num-posts="30" data-width="650">
  </div>

What's the best way to do so using JQuery? I tried the standard

$(document).ready(function ()
{
    $('.uiTextareaNoResize').val("bla bla bla");
 });

but it's not working.

I also noticed that Facebook puts a TITLE "Add Comments..." on the textarea. Is that was is causing to not update that value?

===========================
P.S I love people that MARK DOWN a question. Sometime I truly wonder what could be wrong with them?
-- Must be their way to feel they are helping others

SF Developer
  • 5,244
  • 14
  • 60
  • 106
  • The plugin loads within an iframe, and so you have no access to its elements because of the Same Origin Policy. – CBroe Nov 29 '12 at 11:20
  • @CBroe thanks...I thought the document.ready had access to whatever displays inside the HTML Browser. – SF Developer Nov 29 '12 at 23:39
  • @Developer, correct. But an iframe is not technically part of that "window", its actually another window embed into that single view. You cannot communicate with the iframe expect through "get" variables, which don't apply here – Tommy Crush Dec 10 '12 at 03:46

1 Answers1

0

It is not possible to pre-populate text into the input of a Facebook Comment Plugin.

Possible duplicate of Is it possible to prepoulate the comments box while posting to facebook from an application?

Tommy Crush
  • 2,790
  • 1
  • 15
  • 18