How to implement Graph-API to get data of Facebook Workplace - facebook

I have implemented Facebook API in our APP by using Graph-API. Now I am trying to implement FB-workplace in my application, but i am not able to get any workplace details by using graph-API. I am having my access_token.
I am using FB Graph-API explorer and Postman, but from both the ways i am getting nothing/Error. So What would i change in this to get that data or any more permission needs to update.
Please help in this.
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "AjRPf0Xnp7tkluvI9kWo"
}
}

Related

Unsupported post request. Object with ID act_xxxxxxxxx does not exist

I'm trying to create new custom-audience via facebook graph API as it said on page https://developers.facebook.com/docs/marketing-api/audiences/guides/custom-audiences and i'm getting this error
Status: 400
Response:
{
"error": {
"message": "Unsupported post request. Object with ID 'act_xxxxxxxxxx' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "HihUXD8a35/"
}
}
What permission do i need to make successfull API request or what other reasons could cause this error?
Main task is to make an app that would upload user's data as custom audiences from CRM to Facebook Business Manager account. What steps do I need to follow to that successfully?

Facebook ads leads retrieving (GraphMethodException)

https://graph.facebook.com/v14.0/{lead_id}?access_token=
I'm using this endpoint to get lead data from Facebook Ads forms. When I use this tool (https://developers.facebook.com/tools/lead-ads-testing/) to test the form, it goes well. But in real life (for audience), the leadgen_id comming from webhook's body (https://developers.facebook.com/docs/marketing-api/guides/lead-ads/retrieving/#webhooks) does not work:
{
"error": {
"message": "Unsupported get request. Object with ID '<leadgen_id from webhook>' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https:\/\/developers.facebook.com\/docs\/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "PzqVPIf..."
}
}
At first, I suspected it could be something related to permission, but this other tool (https://developers.facebook.com/tools/debug/accesstoken) said that all the permissions needed were set:
Image

Scraping Data from Facebook Marketplace using GraphAPI

I am trying to scrape data from Facebook Marketplace in a legal way by using their APIs and access tokens. My first attempt is to use GraphAPI with queries in the form of
https://graph.facebook.com/post_id?access_token=token&fields=comments.summary(true).limit(999).filter(stream).fields(id,message,created_time,parent)
However using the post id from Facebook Marketplace doesn't seem to be working, giving me the error message
{
"error": {
"message": "Unsupported get request. Object with ID '292294948474070' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "AOhjN4-go7O0hWgLpJDcWCQ"
}
}
Is there another way to scrape data from Marketplace or some method of GraphAPI that I am missing? My goal for the project is to analyze the market for surfboard sales on Marketplace from this page https://www.facebook.com/marketplace/honolulu/search/?sortBy=creation_time_descend&query=surfboard&exact=false.

Facebook Graph API Can't read public photo comments

I'm trying to read all comments from some FB public post (w/ photo). I found some docs about FB Graph API and build the folowing request. But it fails.
https://developers.facebook.com/tools/explorer/?method=GET&path=1542065625839944&version=v2.11
But I get this:
{
"error": {
"message": "Unsupported get request. Object with ID '1542065625839944' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "HQFdeKx0lqh"
}
}
I also tried with user id 100001095643511_1542065625839944
https://developers.facebook.com/tools/explorer/?method=GET&path=100001095643511_1542065625839944%2Fphotos&version=v2.11
What am I doing wrong? Or is there other easy way to get comments?

How to use facebook api graph as a url?

I get success on Graph API Explorer like in image
https://i.imgur.com/0UbLNej.png
Then i tried to use as URL to do like this.
https://graph.facebook.com/?method=GET&path=5550296508_10157403661361509%2Fattachments&version=v2.10/access_token=my_tokon
But not work, it's show error text.
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "C8XLXuSaBez"
}
}
How can i do ?
You need an access_token to get the response from Facebook Graph Api. you are trying to get attachments using post-id from /v2.10/{post-id}/attachments endpoint.
In the Graph API Explorer, you can generate access_token using get_token button, then you can frame URL to get response as follows:
https://graph.facebook.com/v2.10/5550296508_10157403661361509/attachments?access_token={access_token}