how to setup “Get started” button in facebook messenger bot - facebook

I m trying to use postman
link:https://graph.facebook.com/v6.0/me/messages?access_token=my_token
{
"get_started":{
"payload": "Hi, I am bot"
}
}
in raw JSON body
but getting this response
{
"error": {
"message": "(#100) Tried accessing nonexisting field (messages) on node type (Page)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "AtFh2_fJ2sxkeU8k-2aNJGl"
}
}

Here is the little rundown how to put get started button , I hope its help:
Using postman:
Start by changing the type by choosing a POST request: (one of the
problems that solve my issue thanks to #misorude
Define a Post request to this URL:
https://graph.facebook.com/v6.0/me/messenger_profile?access_token=<PAGE_ACCESS_TOKEN>
As #misorude notice my another problem check endpoint from here https://developers.facebook.com/docs/messenger-platform/reference/messenger-profile-api
In the BODY section:
.
Paste this code:
{
"get_started":{
"payload": "Hi, I am bot"
}
}
P.S.
Thank you again

Related

Linkedin Api to delete creative unable to call (getting 500)

Trying to make a call to linkedin api https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-creatives-new?view=li-lms-2022-10&tabs=http#delete-a-creative
to delete a creative however am receiving a 500 error
{
"code": "GATEWAY_INTERNAL_ERROR",
"message": "Gateway Internal Error"
}
body of the request is:
"patch": {
"$set": {
"status": "PENDING_DELETION"
}
}
}
as per the documentation passed the header
X-RestLi-Method
as
DELETE
The issue was field name
"intendedStatus": "PENDING_DELETION"

(#33) This object does not exist or does not support this action in Facebook Graph API

I am following https://developers.facebook.com/docs/graph-api/advanced/.
GET graph.facebook.com
/search?
q=coffee&
type=place&
center=37.76,-122.427&
distance=1000
Graph API Explorer Screenshot Here
I am getting these response:
{
"error": {
"message": "(#33) This object does not exist or does not support this action",
"type": "OAuthException",
"code": 33,
"fbtrace_id": "ABMnuhD-PiM0LPKBbRa23ZF"
}
}
Can anyone tell me the reason for this Exception and how I should fix this?

I am using ngOpenFB on an ionic app, but I dont manage to get user's email

Login seems to go ok, with the email permission,
however when doing:
var deferred = $q.defer();
$openFB.api({
path: '/me/email'
}).then(function( res ) {
deferred.resolve(res);
//angular.extend(me, {picture: res.data.url});
}).catch(function(err){
console.log(err);
deferred.reject(err);
});
I get an error wrong path.
Ben
/me/email is not a valid endpoint. This is how you get the email of a user: /me?fields=email
The error (from the API Explorer):
{
"error": {
"message": "Unknown path components: /email",
"type": "OAuthException",
"code": 2500,
"fbtrace_id": "FBdZx0Yntxz"
}
}

How do you post a comment to Atlassian confluence using their REST api?

I'm trying to automatically add a comment to a page in confluence using the REST API.
I am testing using Postman, im pointing at this url: https://###########.atlassian.net/wiki/rest/api/content/
using valid headers, and posting this json:
{
"type":"comment",
"container":"72025106",
"body":{
"storage":{
"value":"auto comment 1",
"representation":"storage"
}
}
}
When I do i get this error back:
{
"statusCode": 500,
"message": "java.lang.IllegalStateException: Must provide id and type for Content"
}
this should work:
{"type":"comment",
"container":{
"id":"[PARENT_ID]",
"type":"page",
"status":"current"
},
"body":{
"storage":{
"value":"[COMMENT_BODY]",
"representation":"storage"
}
}
}

an unknown error occured while processing request to facebook graph api

i'm trying to send some likes on facebook page post but for firstt time i notice that error and don't know the reason
request:
https://graph.facebook.com/479322648852908/likes?access_token=CAAEYj0oZAmMsBAHmBWezCtiPfBZAHnOTyzblZB1YxvBbXFZC88ybqS2LlNTwWdsKRECdqZC7A1WEnSVqZCSlt0ftAs8YYmrLtJurIfd5BIotlf1DdMymD1ZBBF9ayYlLrCs1h7JHkRP6PZBv6M2oQpjWVoKPYTufdgdagto3blt2styL2XpYFBsVdmwlmNEQOBwZD&method=POST
Response:
{
"error": {
"message": "(#1) An unknown error occurred",
"type": "OAuthException",
"code": 1
}
}
Any hint ?
I think you can get away without the access token via the url:
http://graph.facebook.com/479322648852908/likes