...
postId
: The unique ID of the post that you want to delete.
Anchor | ||||
---|---|---|---|---|
|
Following is a sample REST request that can be handled by the deletePost
operation.
...
The getPost
operation reads a particular post based on the specified fields.
Noteinfo | ||
---|---|---|
| ||
This operation requires the following properties to be passed within
| ||
Before performing this operation, ensure that you call the |
Code Block | ||||
---|---|---|---|---|
| ||||
<facebook.getPost> <postId>{$ctx:postId}</postId> <fields>{$ctx:fields}</fields> </facebook.getPost> |
...
fields
: The fields of the post that you want to read.Info Fortitle Note For more information on
thefields
propertythe fields property, see https://developers.facebook.com/docs/graph-api/reference/post.
postId
: The ID of the post that you want to read.
Sample request
Following is a sample REST request that can be handled by the getPost
operation.
...
Following is a sample proxy service that illustrates how to connect to Facebook with the init
operation and then use the deletePost
operation. The sample request for this proxy can be found in the deletePost
sample request . You can use this sample as a template for using other operations in this category.
Info |
---|
As a best practice, create a separate sequence for handling the to handle response payload for errors. In the following sample, the sequence that handles errors is is the |
Code Block | ||||
---|---|---|---|---|
| ||||
<proxy xmlns="http://ws.apache.org/ns/synapse" name="facebook_deletePost" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiVersion" expression="json-eval($.apiVersion)"/> <property name="accessToken" expression="json-eval($.accessToken)"/> <property name="postId" expression="json-eval($.postId)"/> <facebook.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiVersion>{$ctx:apiVersion}</apiVersion> <accessToken>{$ctx:accessToken}</accessToken> </facebook.init> <facebook.deletePost> <postId>{$ctx:postId}</postId> </facebook.deletePost> <respond/> </inSequence> <outSequence> <property name="messageType" value="application/json" scope="axis2"/> <send/> </outSequence> </target> <description/> </proxy> |
...