Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F/facebook insights #74

Merged
merged 5 commits into from
Apr 23, 2019
Merged

F/facebook insights #74

merged 5 commits into from
Apr 23, 2019

Conversation

adimascio
Copy link
Contributor

Provide a facbook insights connector.

Check https://developers.facebook.com/docs/graph-api/reference/v2.8/insights_result for the official API documentation.

The connector assumes that you already have a list of page tokens. You can fetch page tokens programmatically but you need a user shortlived token beforehands anyway. For more information about tokens, check https://developers.facebook.com/docs/facebook-login/access-tokens/

Here's a sample python script to fetch all page tokens available to a given user

from toucan_connectors.facebook_insights_connector import get_longlived_token, get_page_tokens

shortlived_token = 'EAAFXzXZAivE4BAP8II1WucQgmNOYlZB...'
ll_token = get_longlived_token(shortlived_token, 'my-app-id', 'my-app-secret')
page_tokens = get_page_tokens(ll_token)

@codecov-io
Copy link

codecov-io commented Apr 17, 2019

Codecov Report

Merging #74 into master will increase coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
+ Coverage   97.69%   97.75%   +0.06%     
==========================================
  Files          27       28       +1     
  Lines        1084     1115      +31     
==========================================
+ Hits         1059     1090      +31     
  Misses         25       25
Impacted Files Coverage Δ
...s/facebook_insights/facebook_insights_connector.py 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29aba5e...c04199a. Read the comment docs.

* `password`: str
* `port`: int
* `charset`: str, default to utf8mb4
* `connect_timeout`: int
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these parameters come from a copy paste and does not relate to Facebook Insights ;)


```javascript
DATA_PROVIDERS: [
type: 'faceobok_insights',
Copy link
Contributor

Choose a reason for hiding this comment

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

'facebook_insights'

## Data source configuration


Either `query` or `table` are required, both at the same time are not supported.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this comment comes from a copy paste, and is not related to Facebook Insights ;)

- `name`: the metric name (e.g. `page_total_actions`)
- `period`: the insight collection period (e.g. `week`)
- `title`: a title for the metric returned
- `description`: a description for the metric returnedd
Copy link
Contributor

Choose a reason for hiding this comment

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

returned

Copy link
Contributor

@vdestraitt vdestraitt left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@PrettyWood PrettyWood left a comment

Choose a reason for hiding this comment

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

LGTM ! Thanks 👍

@PrettyWood PrettyWood merged commit 3154e56 into master Apr 23, 2019
@PrettyWood PrettyWood deleted the f/facebook-insights branch April 23, 2019 14:41
raphaelvignes pushed a commit that referenced this pull request Jan 12, 2022
Translation of a `replace` step in Mongo aggregation pipeline steps.
The `replace` step aims to replace value in a column, and write the resulting column inplace or in a new column.

Closes [issue #61](ToucanToco/weaverbird#61)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants