Forum Discussion

Drawyiana's avatar
Drawyiana
New Member
8 years ago
Solved

Facebook: (#100) Tried accessing nonexisting field (comments) on node type (Page)

Hello Power BI Community,   I could solve the problem by entering the code:   let Source = Facebook.Graph("https://graph.facebook.com/v2.8/microsoftbi/posts?limit=100"), #"Expanded object...
  • v-yulgu-msft's avatar
    8 years ago

    Hi Drawyiana,

     

    After getting all Posts, please expand corresponding items following below sequence:

    object_link

    -> object_link.connections

    -> object_link.connections.comments

    -> object_link.connections.comments.object_link

    -> object_link.connections.comments.object_link.connections

    -> object_link.connections.comments.object_link.connections.comments

    -> object_link.connections.comments.object_link.connections.comments.message

     

    let
    Source = Facebook.Graph("xxxxxxxx"),
    #"Expanded object_link" = Table.ExpandRecordColumn(Source, "object_link", {"connections"}, {"object_link.connections"}),
    #"Expanded object_link.connections" = Table.ExpandRecordColumn(#"Expanded object_link", "object_link.connections", {"comments"}, {"object_link.connections.comments"}),
    #"Expanded object_link.connections.comments" = Table.ExpandTableColumn(#"Expanded object_link.connections", "object_link.connections.comments", {"object_link"}, {"object_link.connections.comments.object_link"}),
    #"Expanded object_link.connections.comments.object_link" = Table.ExpandRecordColumn(#"Expanded object_link.connections.comments", "object_link.connections.comments.object_link", {"connections"}, {"object_link.connections.comments.object_link.connections"}),
    #"Expanded object_link.connections.comments.object_link.connections" = Table.ExpandRecordColumn(#"Expanded object_link.connections.comments.object_link", "object_link.connections.comments.object_link.connections", {"comments"}, {"object_link.connections.comments.object_link.connections.comments"}),
    #"Expanded object_link.connections.comments.object_link.connections.comments" = Table.ExpandTableColumn(#"Expanded object_link.connections.comments.object_link.connections", "object_link.connections.comments.object_link.connections.comments", {"message"}, {"object_link.connections.comments.object_link.connections.comments.message"})
    in
    #"Expanded object_link.connections.comments.object_link.connections.comments"

     

    Best regards,

    Yuliana Gu