Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ After you are done, run this in your shell to fetch the new dependency:
$ mix deps.get
```

## Configuration

```
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you somehow mention what the default configuration is and where to put that file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's for Phoenix, sorry... will update

config :facebook,
appsecret: "<your app secret>",
graph_url: "https://graph.facebook.com",
 graph_video_url: "https://graph-video.facebook.com"
```
For graph_url and video_graph_url, you may also specify versioned urls (recommended) to pin your calls to a specific API version, like so:
```
graph_url: "https://graph.facebook.com/v2.11",
 graph_video_url: "https://graph-video.facebook.com/v2.8"
```
Note that you *must not* end the urls with a slash or the requests will fail (Facebook will report an error about unknown url components)!

Supplying an appsecret is optional. If you supply it, an [appsecret_proof](https://developers.facebook.com/docs/graph-api/securing-requests) will be submitted along with the Graph API requests. The appsecret can be changed (or set) at runtime using `Facebook.set_appsecret("<app secret>")`.

## Usage

1. Register an application on [developer.facebook.com](https://developer.facebook.com)
Expand Down