FacebookClientExtensions.GetCurrentUserAsync<TUser> Method (FacebookClient)
Gets the current user information.
Namespace: Microsoft.AspNet.Mvc.Facebook.Client
Assembly: Microsoft.AspNet.Mvc.Facebook (in Microsoft.AspNet.Mvc.Facebook.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function GetCurrentUserAsync(Of TUser As Class) ( _
client As FacebookClient _
) As Task(Of TUser)
'Usage
Dim client As FacebookClient
Dim returnValue As Task(Of TUser)
returnValue = client.GetCurrentUserAsync()
public static Task<TUser> GetCurrentUserAsync<TUser>(
this FacebookClient client
)
where TUser : class
[ExtensionAttribute]
public:
generic<typename TUser>
where TUser : ref class
static Task<TUser>^ GetCurrentUserAsync(
FacebookClient^ client
)
static member GetCurrentUserAsync :
client:FacebookClient -> Task<'TUser> when 'TUser : not struct
JScript does not support generic types and methods.
Type Parameters
- TUser
The type of the user.
Parameters
- client
Type: FacebookClient
The client.
Return Value
Type: System.Threading.Tasks.Task<TUser>
The current user.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type FacebookClient. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.108) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.108).