Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by Brendan · Oct 07, 2015 at 03:39 AM ·

Facebook account picture as avatar

brainbeat.club
started a topic on Mon, 04 May 2015 at 12:07 AM

Hi

I would like to use user's facebook account picture as avatar in my web game.

Now I use User Data to store url to user's picture in facebook, and retrieved it using GetUserData.

But I don't think this is the good solution.

The avatar picture at least must be copied somewhere.

What is the best way to copy/store/retrieve picture (avatar) using User Data?

Is it better use some CDN instead?

Regards

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Oct 07, 2015 at 03:39 AM

6 Comments
Brendan Vanous said on Mon, 04 May 2015 at 2:44 PM

Could you elaborate on why it would be preferable to copy the image elsewhere, in this case? Is the concern that it takes two calls (one to PlayFab to get the URL, and one to Facebook to get the image)? Generally speaking, games which use Facebook accounts do tend to use the Facebook image URL directly, since it will then be kept current. So if the player changes their profile picture, you'll automatically be on the current version in your game.

Brendan


brainbeat.club said on Mon, 04 May 2015 at 2:59 PM

My concerns are:

  • I heard that facebook people don't like other applications to use their Facebook CDNs, because of heavy load

  • facebook picture url exposes user information


Brendan Vanous said on Mon, 04 May 2015 at 7:10 PM

I haven't heard of a usage restriction on this as yet, but if you have a reference page in their documentation that talks about this, I would be happy to review it. It's possible to encode an image as a Base64 or UUEcoded string and store that as a Value in User Data, but it's not as efficient and doesn't update when the user changes their image, so I really wouldn't recommend it.


brainbeat.club said on Tue, 05 May 2015 at 11:54 PM

Here is a discussion on such topic: http://meta.stackexchange.com/questions/107542/privacy-and-policy-issues-exposing-facebook-user-ids


Brendan Vanous said on Wed, 06 May 2015 at 12:10 AM

I'm afraid I don't follow. The referenced Facebook policy states that Facebook IDs cannot be used outside the Facebook application. We provide the ability to link to Facebook accounts and access user info based on the Facebook ID, but that's all within the context of your Facebook application. There's nothing there which would indicate that you cannot use the existing Facebook API calls to get the user's Facebook picture, so it doesn't look like there should be any issue.


brainbeat.club said on Wed, 06 May 2015 at 1:50 AM

Ok then. I'm going with Facebook CDN.

Avatar urls are stored in User Data and are fetched via GetUserData wherever is needed, so it should be easy to switch to some other CDN in the future.

Thanks

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    No one has followed this question yet.

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges