Search code examples
facebookpluginscommentsfacebook-likexfbml

Set URL of "like" button embedded in Facebook comments plugin


How can I set the URL of the "like" button embedded in the Facebook comments plugin?

The XFBML <fb:like> tag has an href attribute, but the <fb:comments> tag lacks an equivalent attribute.


Solution

  • updated for new version of Facebook comments plugin:

    The new Facebook comments plugin no longer uses the xid attribute. Instead, the href attribute is used to both identify the comments box and associate a URL with it.

    Compare new <fb:comments> to legacy <fb:comments>


    original answer:

    Figured it out while asking the question:

    The <fb:comments> url attribute works like the <fb:like> href attribute.