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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dmitryo
Frequent Visitor

Facebook page insights with Power BI

Hello,

 

I try to get FB page Insights into the Power BI.

I specify Page ID, Connection as "Custom", set "insights" in the texbox.

 

After I specify credentials I get next error:

Details: "Facebook: Invalid query"

 

What is wrong here? 

4 REPLIES 4
v-yuezhe-msft
Employee
Employee

Hi @dmitryo,

Add a new blank query in Power BI Desktop, then paste following code in Advanced Editor and you will be able to get insights data from the your Facebook page.

let
    Source = Facebook.Graph("https://graph.facebook.com/v2.5/pagename/insights")
in
    Source

There is an example for your reference.
1.PNG

Regards,
Lydia

 

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-yuezhe-msft!

 

Thank you for your answer.

 

Why this won't work for versions greater than 2.6? We have 2.9 current, if I'm not mistaken.

 

How can I get other metrics? I need page likes, page impressions (payd, organic, viral, total), reach and so on.

How to execute query similar to:

"https://graph.facebook.com/v2.9/PAGE_NAME/insights?metric=page_impressions&since=2016-01-01

 

Cheers,

Dmitry

@dmitryo,

The issue is related to Facebook API, you can test v2.5 and v2.9 in Facebook console. By using v2.9, facebook api returns error message, thus Power BI Desktop can't get any data from Facebook. Please contact Facebook support to troubleshoot this issue.

2.PNG1.PNG



Regards,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

I've only ever gotten "Me" to work correctly honestly. Probably need to bring this up with the Facebook folks that wrote the connector. You could try turning on tracing, File | Options and settings | Options | Diagnostics | Enable Tracing and see if the trace log gives you any additional information.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors