facebook-ios-sdk-4.0

[Facebook-iOS-SDK 4.0]How to get user email address from FBSDKProfile

一曲冷凌霜 提交于 2019-11-28 06:11:06
I'm upgrading my app to Facebook-iOS-SDK-4.0 , but seems like I can't get user email from FBSDKProfile , since it only provide, username, userid, etc. To fetch email you need to utilize the graph API, specifically providing the parameters field populated with the fields you want. Take a look at Facebook's Graph API explore tool, which can help to figure out the queries. https://developers.facebook.com/tools/explorer The code that worked for me to fetch email is the following, which assumes you are already logged in: NSMutableDictionary* parameters = [NSMutableDictionary dictionary];

[Facebook-iOS-SDK 4.0]How to get user email address from FBSDKProfile

倖福魔咒の 提交于 2019-11-27 01:19:34
问题 I'm upgrading my app to Facebook-iOS-SDK-4.0 , but seems like I can't get user email from FBSDKProfile , since it only provide, username, userid, etc. 回答1: To fetch email you need to utilize the graph API, specifically providing the parameters field populated with the fields you want. Take a look at Facebook's Graph API explore tool, which can help to figure out the queries. https://developers.facebook.com/tools/explorer The code that worked for me to fetch email is the following, which