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
grooble
Frequent Visitor

Get Facebook comments

I have a Power BI query that is getting a lot of useful information from our company's Facebook page for reporting.

Each row of the table is a single post and has fields like id, date, type, no. of likes, ave. view time, and more.

I would now like to get user comments to posts in a comments table.

There is a many to one relationship between the post table and the comments table as any one post may have multiple comments.

 

I think the steps will be as follows:

 

1) GET POSTS: this is a simplified url that works. Put in your own [page_id] to test it on the Facebook API Graph Explorer. https://graph.facebook.com/v4.0/[page_id]/posts?fields=id,message,created_time

*This step is completed in Power BI and works*

 

2) Using the [id] from the GET POSTS query above,

GET COMMENTS: https://graph.facebook.com/v4.0/[id]/comments

The Facebook Graph Explorer gives me comments and a pagination link, so I believe this is correct.

 

How do I populate a comments table based on calling the COMMENTS url on every [id] in the POSTS table?

2 REPLIES 2
v-xuding-msft
Community Support
Community Support

Hi @grooble ,

We can connect to Facebook directly in Power BI Desktop.  And you could reference the document of Tutorial: Facebook analytics using Power BI Desktop to get the comments entirely not be shown as url.

5.PNG

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for your suggestion.
I have actually tried this connector before, but it only gives limited information and doesn't have a way to get the comments of posts that I can see.

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.