Ian,
I'm not sure if I understand your problem correctly, but what I think you need to do:
- remove the <div class="fb-comments" data-href="www.hello.com'" data-num-posts="2" data-width="500"></div> part from the XPage
-
add a computed field control to your xpage, set its output type to HTML
and let it compute the entire div, including the dynamic part for the
current URL. The formula in the computed field could look like this:
"<div class=\"fb-comments\" data-href=\"" + context.getUrl().toString() + "\" data-num-posts=\"2\" data-width=\"500\"></div>"
Don't forget to remove the id of the computed field control and to set disableTheme to true: if you don't do that, your div will be wrapped in a span.
Mark