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

Facebook Page likes and Group member count #7980

Closed
ReenigneArcher opened this issue May 17, 2022 · 3 comments
Closed

Facebook Page likes and Group member count #7980

ReenigneArcher opened this issue May 17, 2022 · 3 comments
Labels
service-badge New or updated service badge

Comments

@ReenigneArcher
Copy link

ReenigneArcher commented May 17, 2022

📋 Description

A badge to show Facebook Group member count would be nice.

🔗 Data

Without an API the data can be obtained from the webpages.
Page
Example page url: https://www.facebook.com/RetroArcherFB
The page likes can be found between the word text and likes... e.g. "text":"30 likes"

Group
Example group url: https://www.facebook.com/groups/retroracher
The member count follows this text: formatted_count_text

Facebook also has an API which would probably be better than using regex, although more complicated to get going initially.

Graph API docs: https://developers.facebook.com/docs/graph-api

It requires a token, which does expire; however, here is method to obtain a permanent access token. https://github.com/ReenigneArcher/facebook-post-action#-how-to-get-a-facebook-permanent-access-token

🎤 Motivation

Would extend Shields social badges.
image

@ReenigneArcher ReenigneArcher added the service-badge New or updated service badge label May 17, 2022
@calebcartwright
Copy link
Member

Thank you for reaching out and sharing your idea.

Facebook badges have actually been requested on a few prior occasions (#6711, #2120) but had to be rejected due to a combination of rate limiting and overall fit.

I think all of those prior concerns still hold which means we'll likely need to close this as a duplicate

@chris48s
Copy link
Member

Agreed - I think the rate limit is still a blocker for us

@ReenigneArcher
Copy link
Author

If anyone finds this looking for the same thing, I have a work around using GitHub actions to cache the response from Facebook's graph api.

I'm using python and here is the relevant code. -> https://github.com/LizardByte/uno/blob/cd723981d20bc907137b77dd1cb11dcef96fcfc2/update.py#L79-L97

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

No branches or pull requests

3 participants