Ringrev / facebook-api-rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle FacebookAccount on facebook

arn-the-long-beard opened this issue Β· comments

Overview of feature πŸ“

We should save on the database the information about the FacebookAccount and the user_access token
- Create Model
- Create Collection
- Create Handler

@osain-az You decide what you should store πŸ˜„

1 - We can have nested data on FullUser
2 - We add a handler in user.rs for user creation with facebook account
3 - We add a handler in auth.rs

The endpoint should be called after the login on facebook happens and we have gotten the user`s data.

Which problem is the feature or enhancement solving❓

By storing the information on the DB, we can reuse the user access token later on to get the page_access_token for Facebook & Instagram.

Documentation & Help ℹ️

It could work the similar way as the google implementation we have.

As discussed, since Arangodb does not check Json, the get business_accounts query has been modify.
The updated query is as shown:
"let accounts = (for acc in business_accounts_company_access filter acc._from==@company_id and acc.access_type=="owner" return acc)

for account in accounts
for b in business_accounts filter b._id == account._to return b"#;"

@arn-the-long-beard, is this task done ?

Yes @osain-az

You have been testing it and it works. Good job @osain-az

@osain-az The task has been updated