I'm using explorer to test this request "::page_id::?fields=id,name,emails", but it returns this error message:
{
"error": {
"message": "(#100) Tried accessing nonexisting field (emails) on node type (PlaceInformation)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "Hzq4cKMXlI1"
}
}
I already tried to use contact_email and user_support_email, but it also didn't work.
What is the right field to get page email?
Take a close look at the error message, it says node type (PlaceInformation). I assume you are trying to use a Place, not a Page. Those are the fields available for Places: https://developers.facebook.com/docs/graph-api/reference/place/
Related
I'm trying to get thumbnail_url using Business Discovery API (LINK) and get an error.
Docs says: You can use both nested requests and field expansion to get public fields for a Business or Creator Account's media objects.
In IGMedia docs says: thumbnail_url - Public
So my working request:
{page-id}?fields=business_discovery.username(nike){media{media_url,media_type,children{media_url}}}.
Response:
And, if I add thumbnail_url field in request:
{page-id}?fields=business_discovery.username(nike){media{media_url,media_type,thumbnail_url,children{media_url}}}
Error:
{
"error": {
"message": "(#100) Please read documentation for supported fields.",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "A2sUKUDWUyAJjyQErkGjx7b"
}
}
It’s not the end. If I add thumbnail_url in children expansion, from response disappears all CAROUSEL_ALBUM posts.
Request:
{page-id}?fields=business_discovery.username(nike){media{media_url,media_type,children{media_url,thumbnail_url}}}
Response:
So my questions:
Is it a bug (seems like that it)? Or docs are not updated?
Is there other official way to get thumbnail_url using Business Discovery API?
Sorry about long read :)
First I auth my user, which has role instagram Test Users, got access token by doint request to https://api.instagram.com/oauth/access_token Follow Getting Started guide.
Make a request to get user data https://graph.instagram.com/me?fields=username&access_token={{ACCESS_TOKEN}}
Everything OK, got 200 status and data.
Now tried to follow API Stories Docs
make a request to: https://graph.facebook.com/{{IG_ID}}/stories?access_token={{ACCESS_TOKEN}} (IG_ID is the ID I got from user data request) but doesn't work return invalid access token
{
"error": {
"message": "Invalid OAuth access token - Cannot parse access token",
"type": "OAuthException",
"code": 190,
"fbtrace_id": "{ID}" //im not sure if important to hide
}
}
Now tried to use Explorer Api Graph (Tools->Explorer) I generate an access token (this token is generated with Facebook, not instagram), use this token and the ID (/me in Explorer API) in previous request and the response is:
//https://graph.facebook.com/{{ID}}/stories?access_token={{TOKEN}}
{
"error": {
"message": "(#100) Tried accessing nonexisting field (stories) on node type (User)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "{ID}"
}
}
Maybe I'm misunderstanding the guide, anyone have worked with API?
Hmmm... Does API works with private/public accounts? Or only if account is Business/Content Creator might use this?
I'm trying to reach SAP Business One Service Layer APU via PostMan and Python (with requests module). However, when I try to POST to /Login endpoint to our Service Layer it gives me the following JSON result:
{ "error": { "code": -304, "message": { "lang": "en-us", "value": "" } } }
As you can see, it's an error code -304 with an empty message value.
The payload I'm sending is a text like this:
{"UserName":"my_username","Password":"my_password","CompanyDB":"NAME_OF_MY_DB"}
I have tried this payload as well to /Login enpoint but with no successful result:
{"Username":"my_username","Password":"my_password","CompanyDB":"NAME_OF_MY_DB"}
but this results in this JSON result:
{ "error": { "code": 102, "message": { "lang": "en-us", "value": "Invalid login credential." } } }
Can anyone, please, suggest what may be wrong here? I need to Login and then GET the Items from the DB.
Thank you in advance
The issue was that I needed to use a domain before the username. So, at the end, the working payload looks like this:
{"UserName":"my_domain\\my_username","Password":"my_password","CompanyDB":"NAME_OF_MY_DB"}
I'm using postman to query from Facebook Graph API. I'm trying next line:
https://graph.facebook.com/v2.8/me?access_token=my_access_token=<here is my user token>
and i get:
{
"error": {
"message": "Invalid OAuth access token.",
"type": "OAuthException",
"code": 190,
"fbtrace_id": "ASBwgp9xF/R"
}
}
I can't figure out alone the right syntax
the access token works at facebook graph api explorer.
You don´t even need postman for this, just hit the URL in your browser.
This is the correct one:
https://graph.facebook.com/v2.8/me?access_token=<here is my user token>
I am learning Rest web services using Postman extension of Chrome. I'm practicing it using Facebook API. I have a question about posting in FB.
URI used: https://graph.facebook.com/me/feed?
In the Body of the POST Method, I have given the following Json content
{
"message": "hello",
"access_token": "<a valid token>"
}
I am very sure that my access token is correct as when I append the access token and message with the above URI, the status gets posted successfully. Also when I use it as key-value pairs in 'x-wwww-form-urlencoded' section, it works fine.
But when I try to update the status using the Body of the POST method with the JSON content mentioned above, it tells
{ "error": { "message": "An active access token must be used to query information about the current user.", "type": "OAuthException", "code": 2500 } }
Is there any thing wrong in the format of the JSON content
I missed content-type=application/json
in the Header section.
Adding this solved the problem