I want to scrape facebook posts with certain keywords, for example "coca-cola".
Graph api search endpoint (/search?q=coca-cola) does not work, it's returning error like
{
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException",
"code": 1,
"fbtrace_id": "HRj+AhMuMHw"
}
}
I know, that it is also possible to scrape data with selenium using this endpoint: https://www.facebook.com/search/str/coca-cola/stories-keyword/stories-opinion, but I think browser will hang out when DOM tree will be very large. So, is there any other way to do this?
Thank you in advance.
Related
Trying to get Instagram insights data through the Facebook API, and keep getting the same error message. I have all the necessary permissions required, auth tokens, etc, and nothing seems to change the response. Any ideas? Here's what I get back:
{
"error": {
"message": "(#100) Tried accessing nonexisting field (insights) on node type (InstagramUser)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "A7sn36A6aleX86dUNqQa3kx"
}
}
Appreciate your help!
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
I use simple app but cannot understand next:
Opened 2 urls:
https://www.facebook.com/media/set/?set=a.675416519138045.1073741830.660049570674740&type=3
AND
https://www.facebook.com/joyasmariajose.valdivieso/media_set?set=a.383620231706322.80737.100001750452794&type=3
When I use Graph Exploder:
GET \675416519138045
return all information about album in this user
But When I try
GET \383620231706322
I can get only user_id and name. On the album have next error:
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"fbtrace_id": "Hb9lKBi2Wpz"
}
}
Question: What can be wrong with second url ?
Unsupported get request usually means that you can't access that resource without an Access Token, i.e. you don't have permissions to this object, as #CBroe said.
I'm trying to search for users on facebook with an app token. Here's the endpoint that I'm accessing with the graph explorer (I've tried both app and access tokens):
https://graph.facebook.com/v2.5/search?q=foo
Here's the error that I'm receiving:
{
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException",
"code": 1,
"fbtrace_id": "BbsgVF64X28"
}
}
Any idea what I'm doing wrong?
Look at the docs at
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.5#search
You need to specify a type parameter to be able to use the search, like
https://graph.facebook.com/v2.5/search?q=foo&type=user
I am facing a problem with Graph API Explorer, and I need to know if it's a known bug in the graph itself or whether something else is wrong.
When I try to get the posts of a page in the graph explorer, most of them show up but some do not although the post itself exists and I can access it in facebook itself.
For your better understanding of the problem here is an example-
593482174003200_649686581716092 gives me this-
{
"error": {
"message": "Unsupported get request.",
"type": "GraphMethodException",
"code": 100
}
}
While this http://www.facebook.com/593482174003200/posts/649686581716092/ shows me the actual post.
Thanks in advance.