Forum Discussion

jocms's avatar
jocms
New Member
8 years ago

DataSource.Error when I try to get Facebook profile picture

This is the response from Facebook Graph Explorer:

 

{
  "data": {
    "height": 200,
    "is_silhouette": false,
    "url": "https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/picture.png",
    "width": 200
  }
}

 

From the Power BI Desktop I get this error:

 

 

I think it's because the data is inside the "data" object but I don't know how I can fix it.

 

Any ideas?

 

7 Replies

  • click edit query, and go to first step which will be source, i guess you see something like record, if yes, click on record, it will show you values from json, and then choose "into table" on convert tab.

     

    it will give you name and value columns, select name column and go to transform tab, click "pivot column",  and  in value columns choose you will have "Value" and click advanced option, chooise "Don't aggregate"

     

    At end of this , you expect column headers from json with data in rows.

     

    • jocms's avatar
      jocms
      New Member

      The error is in the source, I can't pass from there.

       

       

      For some reason it expect a "Table" but gets a "Record".

       

      Could it be a bug in the Facebook connector?

       

      I have no problem with queries that return me JSON like:

       

      {
        "name": "Facebook page name",
        "id": "1234456789"
      }
      • parry2k's avatar
        parry2k
        Icon for Super User rankSuper User

        try this, go to advance editor and wrap everything in json.document function

         

        Json.Document(Facebook.Graph.....)

         

        and see if it works.