question

lu.zhang@sectionstudios.com avatar image
lu.zhang@sectionstudios.com asked

Is there anyway to get player's Facebook's profile picture?

I am just wondering whether I can get the player's Facebook profile picture through Playfab. 

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

We don't have an API method which wraps the call to Facebook to retrieve the profile picture, largely because there's really nothing we would be adding to the call (https://developers.facebook.com/docs/graph-api/reference/user/picture/).

Is there some functionality you see us adding to this which would make it more valuable to titles (but to be clear, which wouldn't violate Facebook's usage policies - https://developers.facebook.com/policy/)?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Arjuna avatar image
Arjuna answered

I know this is a really old question, but I thought I'd reply to it instead of starting a new thread.

It would be great if the GetLeaderboard() or GetFriendLeaderboard() functions would include a player's profile picture (if requested) from one of the associated social accounts (if any). 

I'm trying to do this for my project, where I store the picture URL as public data when a player logs in. However, to extract this information for the leaderboard would require 10 or 20 calls to the playfab API depending on how many scores I display on the leaderboard.

Alternatively I can do the same 10-20 calls as a cloudscript, but I'm not sure if that's much more efficient. 

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

We'll be providing a way for you to store additional data per leadeboard row (think of it as additional columns of data) in an update later this year. Querying for data on every player in a leaderboard really isn't an option, as that will rapidly run the client over the call rate allowable, temporarily blocking that client's calls - not something you want to do, obviously. And a Cloud Script is limited to 10 API calls (https://playfab.com/limits/), so that also wouldn't be a good way to do this currently.

If what you want to do is get the player's current avatar picture from a social network, I would recommend querying that network directly. Calling it from a Cloud Script would not be more efficient - particularly as the delays in waiting for those responses from the other service would rapidly drive your script over the execution time limit.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.