Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
JulienF
Frequent Visitor

Is connection between Facebook graph API and POWER BI over?

Hello Data lovers! 

 

Since this morning I am not able anymore to make connection between Power Bi and Facebook graph api...

I have checked everything ( token, use custom query, ...) and nothing works! That strange beacause I don't recieve email anymore from facebook... I mean when I connected my page account into power Bi I always recieved a mail to say that my user facebook account was connected to Power Bi. Is it Power BI? Or 2.10 graph api ? ( 2.5 was still working yesterday in Power BI...) 

 

I am a bit in the mud because I work for clients and It was very usefull. Now I am back in root mode by quering the Graph api-->then export json --> to excel --> Power Bi ... It works but sometimes Json to excel data export are not accurate and also source of mistakes and it takes me like a all day compare to couples of hours with a bridge between Power Bi and Facebook graph API! 

 

Any tips or help? 

 

Thx! 

 

Julien 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@JulienF,

For your first screenshot, you should paste the code to the Advanced Editor rather than the current Query Editor window. Once you paste the code to Advanced Editor, you will get right data as shown in your second screenshot.
1.JPG

Besides, yes, we need to change api version when getting insights data.
2.JPG

Regards,
Lydia

View solution in original post

11 REPLIES 11
EugeneLebedev
Helper IV
Helper IV

Here is a ready-made code solution that extracts data from Facebook ads into Power BI: https://vidi-corp.com/facebook-ads-connector-to-power-bi-looker/

Anonymous
Not applicable

@JulienF,

What error message do you get when connecting to Facebook in Power BI Desktop?  I get the following error message during the connection process.
1.JPG

To solve this issue, open a new blank query in Power BI Desktop and paste the following code in Advanced Editor.

let
    Source = Facebook.Graph("https://graph.facebook.com/v2.10/pagename/posts?limit=100")
in
    Source


And I don’t get email notification saying that my Facebook account was connected to Power BI even though the connection is successful.

Regards,

@Anonymous Thx! 

 

I don't have any error message but if I paste the code you gave me in the advanced editor I am not able to fetch any data. Power Bi just copy  the code below the advanced editor window with extra # and " and nothing happen. Anyway @DataChant answered me yesterday by mp and I wrote Fx=facebook.graph... in de query editor without any let in source in the advanced editor and it works ,Robot Happy a bit strange but it works (again). I don't really understand because before I used to use the method you gave me and everythings were working fine. 

 

Thx for your help! 

 

Julien 

 

 

Anonymous
Not applicable

@JulienF,

Do you use the latest version of Power BI Desktop(2.49.4831.521)? Would you please post a screenshot about your scenario? And what is the result when you fetch data from Microsoft BI page using the following code?

let
    Source = Facebook.Graph("https://graph.facebook.com/v2.10/microsoftbi/posts?limit=100")
in
    Source



Regards,
Lydia

Yes I have the lastest version of power BI! 

 

So here is the response I got using your query 

 

biforum.PNG

 

Then if I only use this one it works

 

biforum2.PNG

 

To have all the insights I only have to change api version to 2.3 or 2.6 

 

Best,

 

Julien 

Hi, may i ask how do you change the facebook api ver like you mentioned?

Hello!

 

Sorry for the delay! I just changed it in the query as "https://graph.facebook.com/v2.9/... to https://graph.facebook.com/v2.8/..."

 

Enjoy!

Hi, I am Jasper. I was wondering how do you change the facebook api ver?

Anonymous
Not applicable

@JulienF,

For your first screenshot, you should paste the code to the Advanced Editor rather than the current Query Editor window. Once you paste the code to Advanced Editor, you will get right data as shown in your second screenshot.
1.JPG

Besides, yes, we need to change api version when getting insights data.
2.JPG

Regards,
Lydia

Ooooops my bad!!!

 

But it was working before the update? no? Okay I was maybe too tired yesterday 😛 

 

Thx for you help

 

P.S. Do you have any idea how can I fetch data about audience insights form pages  I manage? 

 

Facebook doc is weird and I don't understand the query they give on their website... You can contact me in mp 😉 

Anonymous
Not applicable

@JulienF,

I would recommend you post the question about how to use Facebook API in Facebook community, more experts will assit you  there and you can get better answer.

Regards,
Lydia

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.