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)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function GetFacebookObjectAsync(Of TFacebookObject As Class) ( _
client As FacebookClient, _
objectPath As String _
) As Task(Of TFacebookObject)
'Usage
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
[ExtensionAttribute]
public:
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.
Parameters
- client
Type: FacebookClient
The client.
- objectPath
Type: System.String
The object path.
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
Reference
FacebookClientExtensions Class