Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Jan 08, 2015 at 01:41 PM by Landern for the following reason:

Question is off-topic or not relevant

avatar image
3
Question by NickP_2 · Jan 08, 2015 at 01:31 PM · facebookemail

Get email from facebook SDK

Hello everyone,

I've been struggling with retrieving the email from facebook's SDK.

I googled but without success, has anyone did this before?

Thanks!

Comment
Add comment · Show 3
10 |3000 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
avatar image Landern · Jan 08, 2015 at 01:43 PM 1
Share

Your post didn't relate this to unity whatsoever. You need extended permissions to get the primary email address: https://developers.facebook.com/docs/facebook-login/permissions/v2.2

avatar image nventimiglia · Sep 21, 2015 at 04:03 PM 0
Share

I am using this to request extended permission, it is not working. FB.Login("public_profile,user_friends,user_birthday,email", result => { });

avatar image jprocha101 · Nov 16, 2015 at 09:32 PM 1
Share

@nventimiglia Try this:

 public void Login()
         {
             var perms = new List<string>() { "public_profile", "email" };
             FB.LogInWithReadPermissions(perms, AuthCallback);
         }
 
 void AuthCallback(ILoginResult result)
         {
             $$anonymous$$NP.ShowPreloader(STRINGS.PROGRESS_TITLE, STRINGS.PROGRESS_$$anonymous$$ESSAGE);
 
             if (FB.IsLoggedIn)
             {
                 // $$anonymous$$ake a Graph API call to get email address
                 FB.API("/me?fields=email", Http$$anonymous$$ethod.GET, graphResult =>
                 {
                     if (string.IsNullOrEmpty(graphResult.Error) == false)
                     {
                         Debug.Log("could not get email address");
                         return;
                     }
 
                     string email = graphResult.ResultDictionary["email"] as string;
                     Debug.Log(email);   
 
                 });
             }
             else
             {
                 Debug.Log("User cancelled login");
             }
 
         }

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

28 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

social network & share function 4 Answers

Social features for iOS? 2 Answers

Facebook log in with email and password 0 Answers

How to intergrate facebook SDK with a mobile game 1 Answer

Turning off SSO on Facebook's Unity SDK for Android 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges