Skip to content

Commit

Permalink
Fix Facebook auth scopes (#264) (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbek authored Oct 26, 2020
1 parent d5e9413 commit 4cb87ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bees/facebookbee/facebookbee.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (mod *FacebookBee) handleStream(since string) (string, error) {
ClientID: mod.clientID,
ClientSecret: mod.clientSecret,
RedirectURL: api.CanonicalURL().String() + "/" + path.Join("oauth2", mod.Namespace(), mod.clientID, mod.clientSecret),
Scopes: []string{"public_profile", "publish_actions"},
Scopes: []string{"public_profile", "pages_manage_posts", "publish_to_groups", "pages_read_engagement"},
Endpoint: oauth2fb.Endpoint,
}

Expand Down
4 changes: 2 additions & 2 deletions bees/facebookbee/facebookbeefactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (factory *FacebookBeeFactory) OAuth2AccessToken(id, secret, code string) (*
ClientID: id,
ClientSecret: secret,
RedirectURL: api.CanonicalURL().String() + "/" + path.Join("oauth2", factory.ID(), id, secret),
Scopes: []string{"public_profile", "publish_actions"},
Scopes: []string{"public_profile", "pages_manage_posts", "publish_to_groups", "pages_read_engagement"},
Endpoint: oauth2fb.Endpoint,
}
token, err := conf.Exchange(oauth2.NoContext, code)
Expand All @@ -99,7 +99,7 @@ func (factory *FacebookBeeFactory) Options() []bees.BeeOptionDescriptor {
ClientID: "__client_id__",
ClientSecret: "__client_secret__",
RedirectURL: api.CanonicalURL().String() + "/" + path.Join("oauth2", factory.ID(), "__client_id__", "__client_secret__"),
Scopes: []string{"public_profile", "publish_actions"},
Scopes: []string{"public_profile", "pages_manage_posts", "publish_to_groups", "pages_read_engagement"},
Endpoint: oauth2fb.Endpoint,
}
u, err := url.Parse(conf.Endpoint.AuthURL)
Expand Down

0 comments on commit 4cb87ec

Please sign in to comment.