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

FB Graph API - how will access to multiple groups work #2

Closed
alecfrancesconi opened this issue May 2, 2017 · 2 comments
Closed

FB Graph API - how will access to multiple groups work #2

alecfrancesconi opened this issue May 2, 2017 · 2 comments

Comments

@alecfrancesconi
Copy link
Collaborator

We know that the API supports multiple requests but can those requests span multiple groups in the same HTTP request and how will the access tokens work

@nausicaa-rose
Copy link
Contributor

Facebook Graph API

The Facebook Graph API makes it fairly easy to post to multiple groups with a minimal number of HTTP requests. By using batch requests, we can post to up to 50 groups at a time (which should mean 1 request for smaller states). To set up access tokens, we'll have to connect our app to the user's Facebook account, and get a User Access Token. There is a React SDK that should help in setting this up. Once we have an access token, we should be able to post to any group the user is a member of. Further documentation on access tokens can be found here.

Here's a summary of the data fields we'll need to create, update, and delete posts.

To post to group

  • From user login:
    • user-id
    • access token
  • From Facebook API:
    • group-id (should store these in Mongo as part of the group documents. I'll see if there's a way to scrape
      this and add that functionality to our scrapper if I can.)

To update/delete post

  • From user login:
    • user-id
    • access token
  • From Facebook API:
    • post-id

Facebook documents these operations here.

Facebook batch requests are documented here. There is currently a limit of 50 requests per batch. Batch requests are sent as a JSON
array of HTTP requests.

When messages are posted, the API returns the post-id, so we need to make sure
we capture and store those in case we need to update or delete a post.

@jonganc
Copy link
Contributor

jonganc commented Jul 13, 2017

I'm going to refactor this issue into more current ones.

@jonganc jonganc closed this as completed Jul 13, 2017
jonganc pushed a commit that referenced this issue Oct 27, 2017
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

No branches or pull requests

3 participants