FacebookClientExtensions.GetFacebookObjectAsync<TFacebookObject> Method (FacebookClient, String)

Gets the Facebook object located at a given path.

Namespace:  Microsoft.AspNet.Mvc.Facebook.Client
Assembly:  Microsoft.AspNet.Mvc.Facebook (in Microsoft.AspNet.Mvc.Facebook.dll)


<ExtensionAttribute> _
Public Shared Function GetFacebookObjectAsync(Of TFacebookObject As Class) ( _
    client As FacebookClient, _
    objectPath As String _
) As Task(Of TFacebookObject)
Dim client As FacebookClient 
Dim objectPath As String 
Dim returnValue As Task(Of TFacebookObject)

returnValue = client.GetFacebookObjectAsync(objectPath)
public static Task<TFacebookObject> GetFacebookObjectAsync<TFacebookObject>(
    this FacebookClient client,
    string objectPath
where TFacebookObject : class
generic<typename TFacebookObject>
where TFacebookObject : ref class 
static Task<TFacebookObject>^ GetFacebookObjectAsync(
    FacebookClient^ client, 
    String^ objectPath
static member GetFacebookObjectAsync : 
        client:FacebookClient * 
        objectPath:string -> Task<'TFacebookObject>  when 'TFacebookObject : not struct
JScript does not support generic types and methods.

Type Parameters

  • TFacebookObject
    The type of the Facebook object.


  • client
    Type: FacebookClient
    The client.

Return Value

Type: System.Threading.Tasks.Task<TFacebookObject>
Returns Task<TResult>.

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).

See Also


FacebookClientExtensions Class

GetFacebookObjectAsync Overload

Microsoft.AspNet.Mvc.Facebook.Client Namespace