[Opa] Facebook integration, escaping and namespaces in xhtml
Dmitry Degtyarev
ddegtyarev at gmail.com
Tue Sep 20 08:19:44 EDT 2011
Hello,
This is my first post to the list. I find OPA very promising and currently
in the process of building a niche social network with it.
Three questions:
1. What is the most straightforward and recommended way of creating a
Facebook Login button on a page?
I've created a function to do that:
FacebookLogin = {{
html(id) = <>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>{"FB.init(\{appId:'{id}', cookie:true, status:true,
xfbml:true\});"}
</script>
<fb:login-button>Login with Facebook</fb:login-button>
</>
}}
The next questions came up when I tried to compile this...
2. How do I escape curly braces inside xhtml? \{ didn't work for me, so I
had to use string insertion, which I find ugly
3. How do I use namespaces inside xhtml? The sample above does not compile,
saying
the variable xmlns:fb is unbound.
Hint:
Perhaps you meant xmlns: or Xmlns ?
Should I use @xml? Simply replacing <> with @xml( doesn't solve the problem
Regards,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.owasp.org/pipermail/opa/attachments/20110920/3fc65e5f/attachment.html
More information about the Opa
mailing list