Skip to content

Commit

Permalink
Modified readme - Making 1.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Sudhir Nimavat committed Aug 10, 2013
1 parent 8f6b4ef commit cc5fdb1
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ Following configuration options are available.
All of the config options are optional.
See [facebook documentation](https://developers.facebook.com/docs/reference/plugins/comments/) for details about possible values.

## Integrating facebook comments into your application.
## Usage
Follow this steps for integration

*Step 1*
**Step 1:**
Put `<fb:initFbCommentsJS appId="your app id" />` right after opening `<body>` tag. It will initialize facebook comments js sdk.
appId parameter is optional and if not specified it will be picked up from config.

*step 2*
put `<fb:comments width="" colorscheme="", num_posts="" mobile="" href="http://example.com"/>` anywhere in the page where you want comments to be displayed.
**step 2:**
put `<fb:comments width="" colorscheme="", num_posts="" mobile="" href="http://example.com"/>` in the page where you want comments to be displayed.
Again all of the parameters are optional and if not specified they will be picked up from config.

#### Configuring data-href url
-----
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.
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.
**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.
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.

*Example*
```
Expand All @@ -49,4 +49,9 @@ And now in your gsp file
```

When href is not passed as parameter to `<fb:comments />` or not configured in Config.groovy, current request url will be used as href.
When *href* is not passed as parameter to `<fb:comments />` or not configured in Config.groovy, current request url will be used as href.


**Note:**
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.
You can use `grails.plugin.facebookcomments.href` Closure configuration option to generate whatever url you want based on the bean passed.

0 comments on commit cc5fdb1

Please sign in to comment.