You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-7Lines changed: 12 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,21 +19,21 @@ Following configuration options are available.
19
19
All of the config options are optional.
20
20
See [facebook documentation](https://developers.facebook.com/docs/reference/plugins/comments/) for details about possible values.
21
21
22
-
## Integrating facebook comments into your application.
22
+
## Usage
23
23
Follow this steps for integration
24
24
25
-
*Step 1*
25
+
**Step 1:**
26
26
Put `<fb:initFbCommentsJS appId="your app id" />` right after opening `<body>` tag. It will initialize facebook comments js sdk.
27
27
appId parameter is optional and if not specified it will be picked up from config.
28
28
29
-
*step 2*
30
-
put `<fb:comments width="" colorscheme="", num_posts="" mobile="" href="http://example.com"/>`anywhere in the page where you want comments to be displayed.
29
+
**step 2:**
30
+
put `<fb:comments width="" colorscheme="", num_posts="" mobile="" href="http://example.com"/>` in the page where you want comments to be displayed.
31
31
Again all of the parameters are optional and if not specified they will be picked up from config.
32
32
33
33
#### Configuring data-href url
34
34
-----
35
-
href parameter is used identify the page for comments. It can directly specified in `<fb:comments>` tag, or it can be configured as a Closure in config.
36
-
When no href parameter is passed to `<fb:comments>` tag, it will check if Closure is configured in config, if so, the closure will be called and return value will be used as href.
35
+
**href** parameter is used identify the page for comments. It can be directly specified in `<fb:comments>` tag, or it can be configured as a Closure in config.
36
+
When no *href* parameter is passed to `<fb:comments>` tag, it will check if Closure is configured, if so, the closure will be called and return value will be used as href.
37
37
38
38
*Example*
39
39
```
@@ -49,4 +49,9 @@ And now in your gsp file
49
49
50
50
```
51
51
52
-
When href is not passed as parameter to `<fb:comments />` or not configured in Config.groovy, current request url will be used as href.
52
+
When *href* is not passed as parameter to `<fb:comments />` or not configured in Config.groovy, current request url will be used as href.
53
+
54
+
55
+
**Note:**
56
+
Facebook comments are associated with a url, You will loose comments if you change *href* attribute of a comment box after some comments has been posted.
57
+
You can use `grails.plugin.facebookcomments.href` Closure configuration option to generate whatever url you want based on the bean passed.
0 commit comments