Fetch user email with C# Facebook SDK -


i fetch user's email using c# facebook sdk. how can so? i've tried code below, empty email. because somehow need ask more rights? if so, how do that?

facebook.facebookclient fbc = new facebook.facebookclient(user.mobileserviceauthenticationtoken); dynamic clientcredentials = await fbc.gettaskasync("oauth/access_token",      new{client_id = facebookclientid,client_secret = facebookclientsecret,     grant_type = "client_credentials",redirect_uri = "https://xxx.azure-mobile.net/signin-facebook"});  fbc.accesstoken = clientcredentials.access_token; fbc.appid = facebookclientid; fbc.appsecret = facebookclientsecret; string id = user.userid.replace("facebook:", string.empty); dynamic result = await fbc.gettaskasync(id + "?fields=id,name,picture,last_name,first_name,gender"); 

best regards tj78

you need gather email permission in login url's scope parameter, otherwise not able receive email field.


Comments

Popular posts from this blog

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -