...
...
Sample request
...
Code Block |
---|
language | html/xml |
---|
title | Sample Request for createLike |
---|
|
{
"apiUrl":"https://graph.facebook.com",
"apiVersion":"v2.4",
"accessToken":"CAAD8biEgxBIBAOt0XA4FdFFQXg8hzVtYHdrDpeeRa1nHmCylWoOiFmZAWmDYMXnZCZC2akkuIsIM2tEXZBZC1JbhFFZAqRZBRKKvTZCfnhSpojHW0BG3nVKBOGYJCKEcNT7T6onY2poZBrZBZB0FtgZB89ZCSr2THH48eZC5xcNcTjU0QxKZAjJj8cQjebmzm8883RhbErPEF5OcLUpdwZDZD",
"resourceId":"1402049403394184"
} |
Get likesThis method allows you to get likes for an object such as video, posts, status, note, photo, album and comment.
Code Block |
---|
language | html/xml |
---|
title | createLike |
---|
|
<facebook.getLikes>
<resourceId>{$ctx:resourceId}</resourceId>
<summary>{$ctx:summary}</summary>
</facebook.getLikes> |
Properties
resourceId: This is the ID of the resource.
Sample request
Following is a sample REST request for the getLikes
method.
Code Block |
---|
title | Sample Request for getLikes |
---|
|
{
"apiUrl":"https://graph.facebook.com",
"apiVersion":"v2.4",
"accessToken":"CAAD8biEgxBIBAOt0XA4FdFFQXg8hzVtYHdrDpeeRa1nHmCylWoOiFmZAWmDYMXnZCZC2akkuIsIM2tEXZBZC1JbhFFZAqRZBRKKvTZCfnhSpojHW0BG3nVKBOGYJCKEcNT7T6onY2poZBrZBZB0FtgZB89ZCSr2THH48eZC5xcNcTjU0QxKZAjJj8cQjebmzm8883RhbErPEF5OcLUpdwZDZD",
"resourceId":"1402049403394184"
} |
Deleting a like
...
Code Block |
---|
language | html/xml |
---|
title | deleteLike |
---|
|
<facebook.deleteLike>
<resourceId>{$ctx:resourceId}</resourceId>
</facebook.deleteLike> |
Properties
resourceId: This is the ID of the resource such as a post, video, etc.
Sample request
Following is a sample REST request for the deleteLike method.
...
Code Block |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="facebook_createLike"
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="resourceId" expression="json-eval($.resourceId)"/>
<facebook.init>
<apiUrl>{$ctx:apiUrl}</apiUrl>
<apiVersion>{$ctx:apiVersion}</apiVersion>
<accessToken>{$ctx:accessToken}</accessToken>
</facebook.init>
<facebook.createLike>
<resourceId>{$ctx:resourceId}</resourceId>
</facebook.createLike>
<respond/>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
<description/>
</proxy> |