Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

SocialContextOperations: return user picture in getAllMutualFriends response #221

Open
troig opened this issue Oct 10, 2016 · 0 comments
Open

Comments

@troig
Copy link

troig commented Oct 10, 2016

According to the graph API documentation, facebook is returning the user picture in all mutual friends response.
This is very usefull, specially for those users that don't use the app (now only the name user can be retrived through spring-social-facebook)

Example response from facebook:

{
  "context": {
    "all_mutual_friends": {
      "data": [
        {
          "name": "Non App User",
          "token": "QVNscHZAQM0w5ZAS0yY1ZAuak45aVQ3Y05sbWtMb0x0eEZAWM0d6WFBoOUM0UWVfUnpOdkZAsUXhaM0tqMEdOWFJsNjlPUFpWVHRNMVdUNk5LYk5pcEhpS01HMDRnV2wzYlNZAU2RhTGRGWW1Eb0lmc2cZD",
          "picture": {
            "data": {
              "is_silhouette": true,
              "url": "https://scontent.xx.fbcdn.net/v/t1.0-1/c15.0.50.50/p50x50/1379841_10150004552801901_469209496895221757_n.jpg?oh=7d1a30477a7ac57749e72821136a7090&oe=5865EA33"
            }
          }
        },
        {
          "name": "APP User",
          "token": "QVNsY0NnT3JUTkJZAMXE2eUdjMEJFREp0ZA2RmUHVBTUtTOGltZA0xKal81THQtamdtRFVRS1gtdDI0TnJfVEtLamlKQmxpZAVY0R2pROVRET3lVLVhQbjdqZAGFySDZAWdUtONHhUcnU1S2tURzBLcFEZD",
          "picture": {
            "data": {
              "is_silhouette": false,
              "url": "https://scontent.xx.fbcdn.net/v/t1.0-1/c50.50.621.621/s50x50/397837_10150472809100036_1549619425_n.jpg?oh=c06f0c22938d845d8ea764d21ce35d62&oe=58690A97"
            }
          },
          "id": "10153377367605036"
        }
      ]
      ...
    }
  }
}

Maybe a choice could be returning the user picture in FacebookObject extra data..

Something like that (example for a non app user):

{
 "id": null,
 "name": "Non App user name",
 "extraData": {
   "id": "picture",
   "value": "https://scontent.xx.fbcdn.net/v/t1.0-1/c15.0.50.50/p50x50/1379841_10150004552801901_469209496895221757_n.jpg?oh=7d1a30477a7ac57749e72821136a7090&oe=5865EA33"
 }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant