You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This solution indeed returns the email of the user, but fails with first_name, last_name and significant_other (and any other field I tried besides name, id and email).
Also, is it possible getting the FB access token? We might need it for future querying of other edges, or use it to manually query Facebook because ASP.NET Core has a bug (at least in RC1).
I need a way, even if not the cleanest.
The text was updated successfully, but these errors were encountered:
I'm trying to get additional fields from Facebook (first_name, last_name, email and significant_other). This solution indeed returns the email of the user, but fails with first_name, last_name and significant_other (and any other field I tried besides name, id and email).
In RC1, the Facebook middleware automatically stores the email as a claim, but not the first name or last name so you need to manually extract them using the event model if you want to be able to retrieve from application code:
In RC2, custom code won't be necessary, as the first name/last name are now included by default: #688.
Also, is it possible getting the FB access token? We might need it for future querying of other edges, or use it to manually query Facebook because ASP.NET Core has a bug (at least in RC1).
You can use the SaveTokensAsClaims option to store the access/refresh tokens as claims (enabled by default in RC1). If you need more information about this feature, you can take a look the PR that introduced it: #257.
Yes, sorry for the cross posting.
I needed it urgently for tomorrow morning, and already Googled for 3 days or so. 😢
Tons of non-working answers out there.
I'm using ASP.NET core RC1 (and can't upgrade to the not yet release RC2 nightly builds because of the lack of VS support in RC2).
I'm trying to get additional fields from Facebook (
first_name
,last_name
,email
andsignificant_other
).I used the code suggested on this issue:
This solution indeed returns the
email
of the user, but fails withfirst_name
,last_name
andsignificant_other
(and any other field I tried besides name, id and email).Also, is it possible getting the FB access token? We might need it for future querying of other edges, or use it to manually query Facebook because ASP.NET Core has a bug (at least in RC1).
I need a way, even if not the cleanest.
The text was updated successfully, but these errors were encountered: