How to retrieve Fan Count from a Facebook Page

Hello guys,

I’m developing a platform for athletes who are seeking sponsorship opportunities.
For that end, our app must gather some data from the athlete’s facebook page.

First, I have tried to scrape the data using XML and IMPORTHTML with Google Sheets, until I found it it’s not authorized by Facebook, and it didn’t really work.
Then, I have tried using Facebook Plugin, but it just lets me retrieve name, profile photo, and other data, but just from the user, not their Facebook Pages. Facebook API uses a different scope for facebook pages.

Anyway, all we need is for the user to login to Facebook in the app, choose the page they wish to sync, and then we retrieve the Page’s photo, name and fan count, and add this to our Bubble database…
Even though it seems so simple, I have been unable to achieve it.
I feel it will be required to develop an API Plugin, and I lack the knowledge to do so.

Does anyone have any experience on how to achieve this?

Thank you very much.

Hi @renatoasse,

You’ll need to create a custom API integration with the API Connector. It’s like building an API plugin, but just for your app. In fact, the API Connector itself is a plugin and in my opinion one of Bubble’s most powerful features.

Facebook has been performing major surgery on their APIs recently (privacy overhaul, mainly), so depending on the scopes you need, you may need to submit your app for review. Just a heads up that you may not have instant access to some endpoints if a review is required.

Also, some endpoints require user and/or app authorization, so pay attention to the requirements there too. There’s quite a bit to navigate if you haven’t worked with APIs before, especially with Facebook which has approximately three gazillion endpoints :wink:, but feel free to reach out if you want to walk through the documentation and/or a strategy together!

Gaby at Coaching No Code Apps (formerly Coaching Bubble)

Courses & Products, Tutorials, Private Coaching, and High-level Development

Start Learning Today :mortar_board: