Cannot delete Facebook some test users - facebook

When I call:
$ curl 'https://graph.facebook.com/v2.2/<APP_ID>/accounts/test-users?access_token=<APP_ACCESS_TOKEN>&limit=500'
I see 82 accounts, and all but one look like this:
{
"id": "1413484435585065",
"login_url": "https://developers.facebook.com/checkpoint/test-user-login/1413484435585065/"
}
That is, they have no access token.
When I try to delete them I get:
$ curl -XDELETE 'https://graph.facebook.com/v2.2/1413484435585065?access_token=<APP_ACCESS_TOKEN>'
{
"error": {
"message": "(#100) Invalid value specified for param: id",
"type": "OAuthException",
"code": 100
}
}
The only one that DOES have an access token returns:
{
"error": {
"message": "(#2904) You cannot delete the Open Graph Test User for your app.",
"type": "OAuthException",
"code": 2904
}
}
If I go to Roles...Test Users on the Developers page of the app, then it is empty!
Any new test users I create I can see on the Developers page, and I can delete them using the mentioned curl call.
Where could these test users come from, and how do I get rid of them? Or at least filter them when I am listing test users.

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?

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

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

Get the Facebook User ID from a random profile URL

There are several solutions proposed, but as is stated here (https://stackoverflow.com/a/26839926/1893249 ) , it seems to be impossible.
In the FB Graph API explorer( https://developers.facebook.com/tools/explorer ), "/v2.4/cnn" returns the following, which is promising,
{
"name": "CNN",
"id": "5550296508"
}
until you put in "/v2.4/priscilla" and it returns:
{
"error": {
"message": "(#803) Cannot query users by their username (priscilla)",
"type": "OAuthException",
"code": 803
}
}
Likewise, this approach looks promising "/v2.4/?ids=http://www.imdb.com/title/tt0117500/"
until you put in "/v2.4/?ids=https://www.facebook.com/priscilla"
and it just returns the not-so-helpful:
{
"https://www.facebook.com/priscilla": {
"id": "https://www.facebook.com/priscilla"
}
}
But if it's impossible, than how is it done here?
http://findmyfbid.com/ with the URL,
https://www.facebook.com/priscilla
Scrapping the Facebook page Does the trick, but I'doubt if it's legal
curl -v https://www.facebook.com/USERNAME 2>&1 |
grep -o 'userID.*]' | head -n1 | cut -c 10-24

Facebook Graph API - GraphMethodException error code 100

This is how I have been using graph API to get public info of an user:
http://graph.facebook.com/{user_id}
It was working for almost all the users except this with uid 1283218355
http://graph.facebook.com/1283218355
So when I try this link, it gives error with code 100.
{
"error": {
"message": "Unsupported get request.",
"type": "GraphMethodException",
"code": 100
}
}
What could be the problem?