cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Node1
New Member

Getting Data from Workplace/Facebook Graph API

Scenario: I’m looking to get data from the Workplace Graph API. Workplace is owned by Meta and the API allows for a subset of functionality of the Graph API from Facebook.

 

I was able to pull 25 records but I’m currently stuck at pagination to get more results.  

Here’s the paginated results link from the documentation

Problem: I’m still very new to PQ advanced editor and M code so I’m not sure how to code the pagination using the documentation provided. For example, the maximum number of results we get back for members is 25 if I remove the limit.


Current Code:

 

let
#“BaseURL” = “https://graph.facebook.com/community/”,
#“limit” = 5,

Source = Json.Document(
Web.Contents(
#“BaseURL”,
[
RelativePath = “members”,
Query =
[
limit = Text.From(#‘limit’),
],
Headers=[
#“Authorization” = "Bearer " & #“Header”,
#“content-type” = “application/json”
]

        ]
        )
)

in
Source

0 REPLIES 0

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors
Top Kudoed Authors