Can't delete an action using Graph API Explorer - facebook-graph-api

I have an app that is successfully publishing user actions such as read.news to facebook. I'm building in a way to delete those actions if they wish. When attempting to run this code I get the following error message in my console and the Graph API Explorer:
{
"error": {
"message": "Unsupported delete request.",
"type": "GraphMethodException",
"code": 100
}
}
I know that when I tried this over a week ago I was able to delete an action so something has changed. What is the cause of this error?

Related

Get a Facebook Event through Graph API

I am trying to get the details of a facebook event:
https://www.facebook.com/events/2007260672817604/
Following the documentation, I tried to GET the info for the event mentioned above
curl -i -X GET \
"https://graph.facebook.com/v15.0/2007260672817604?access_token=..."
But I'm getting the following error:
{
"error": {
"message": "Unsupported get request. Object with ID '2007260672817604' 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": "AeB6EiSUlbDN7AAzDSoAKxY"
}
Do I need any special permission to be able to do this request? Is it even possible to get the information of public events?

Facebook Ads Attribution Data - Error #100

Pretty straightforward: I'm trying to get Facebook ads attribution data for my Android app using Open Graph API (so I can detect which users came from Facebook ads, which ad, etc). When I use the below url, I get the following error:
{ "error": {
"message": "(#100) Tried accessing nonexisting field (activities) on node type (Application)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "H4b8LYlSGeN" } }
https://graph.facebook.com/{app_id}/activities?access_token={token}&event=MOBILE_APP_INSTALL&attribution={attribution_id}
I got the method via this page in their documentation, which does appear to indicate it works the way I expect.
Am I missing something here? Am I using a totally wrong method to get attribution data?
I was making a GET request rather than a POST because I'm a dumdum

Facebook ids_for_pages returns "An owning business is required"

I am trying to connect 2 scoped ids of the same user from Messenger and private_replies API call.
When I call ids_for_pages with the private_replies senderId I get this response:
{
"error": {
"message": "(#100) An owning business is required for this request",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "C1wGrChj+O3"
}
}
Any idea what this means?
Maybe this is a bit old, but I faced the same problem today because the error is not clear at all. To solve this, you need to be sure that your page and app are linked or "owned" by the same business, to do that you must go to the business manager:
https://developers.facebook.com/docs/apps/business-manager#update-business

google cloud api unknown name "body_resource"

I want to get the IAM policy for a user using
https://cloud.google.com/resource-manager/reference/rest/v1/projects/getIamPolicy
When I enter a userid into the resource field though, I get
{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"body_resource\": Cannot find field.",
"status": "INVALID_ARGUMENT",
"details": [
{
"#type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "Invalid JSON payload received. Unknown name \"body_resource\": Cannot find field."
}
]
}
]
}
}
What should I put in the request body to get the IAM policy for this user? Or is the error wrong and Users just dont have resource policies like this?
EDIT: To be clear, I get this error no matter what I put in the resource field
I think right now the UI for this API is broken and doesn't work from the browser, I get the same error.
You can however try calling it from the API explorer, or by making the call using the api client libraries as shown in the examples at the bottom of the page you linked.
The in-page explorer did have a bug, but the fix is rolling out now.
This was caused by an issue with how the GAPI library calls APIs with a parameter called 'resource', so it should only have affected pages with such a parameter in their method.

Failed to get message attachments and shares from facebook

I am using facebook graph api to get user message
I try to get shares object from messages sent between two users.
According to Facebook documentation I should use the method /{message-id}/shares https://developers.facebook.com/docs/graph-api/reference/v2.2/message/shares
But when I tried this with a user with read_mailbox permission I get the following error:
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100
}
}
so what I have to do to get shares and attachments
thanx in advanced