Using Other APIs with the Business SDK

In the scenario below we are replying to a Page's Messenger thread using the Conversations API. The Page is having a conversation with a person. For example, a User sent a message to a Page so the Page replies directly to the User.

$fields = array(
);
$params = array(
);
$conversationss = (new Page(<PAGE_ID>))->getConversations(
  $fields,
  $params
);
$conversations_id = $conversationss[0]->id;
$params = array(
    'message'=> "This is a message sent to a User.",
);
$page_send_message = $api->call(
  "/".join("/", [$conversationss[0]->id, "messages", ]),
  'POST',
  $params,
);
fields = [
]
params = {
}
conversationss = Page(<PAGE_ID>).get_conversations(
    fields=fields,
    params=params,
)
conversations_id = conversationss[0].get_id()
params = {
    'message': "This is a message sent to a User.",
}
page_send_message = FacebookAdsApi.get_default_api().call(
  method='POST',
  path=[conversationss[0].get_id(), "messages", ],
  params=params,
)
APINodeList<UnifiedThread> conversationss = new Page(<PAGE_ID>, context).getConversations()
  .execute();
String conversations_id = conversationss.get(0).getId();
APIResponse pageSendMessage = new APIRequest<APINode>(
  context,
  "",
  new StringBuilder()
    .append("/").append(conversationss.get(0).getFieldId()).append("/").append("messages")
    .toString(),
  "POST"
)
.setParam("message", "This is a message sent to a User.")
.execute();
page = FacebookAds::Page.get(<PAGE_ID>)
conversationss = page.conversations({
})
conversations_id = conversationss[0].id
print 'conversations_id:', conversations_id
params = {
'message': "This is a message sent to a User.",
}
page_send_message = FacebookAds::APIRequest.new(
:post,
[conversationss[0].id, "messages", ].join('/'),
session:FacebookAds::Session.default_session,
params:params,
).execute_now()
fields = [
];
params = {
};
let conversationss = await (new Page(<PAGE_ID>)).getConversations(
  fields,
  params
);
let conversations_id = conversationss[0].id;
params = {
    'message': "This is a message sent to a User.",
}
page_send_message = await bizSdk.FacebookAdsApi.getDefaultApi().call(
  method='POST',
  path=[conversationss[0].id, "messages", ],
  params=params,
)

Learn more about the Conversation node and the Messenger Platform.