How can I fetch age-restricted page using generic app token? - facebook

How can I fetch age-restricted page using generic app token ?
Here is how I get app token
https://graph.facebook.com/oauth/access_token?client_id=1237603453455381&client_secret=3539257a5231e337bb26d110bfb5e500&grant_type=client_credentials
But when I attempt to call
https://graph.facebook.com/60409543921?access_token=1237603453455381|H4PkFBu2PlSzHHMLPvHcSt8Y9Os
I get error
{
"error": {
"message": "Unsupported get request.",
"type": "GraphMethodException",
"code": 100
}
}
Is there workaround against it other than using my personal token on server ?

Related

Query Search FB with postman

i'm trying fb query search on postman
https://graph.facebook.com/pages/search?q=Facebook
&fields=id,name,location,link
&access_token={access-token}
and it returns this error
{
"error": {
"message": "(#100) Page Public Metadata Access requires either app secret proof or an app token",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "A0DGbr5CxQEimI0NDK9UyZj"
}
}
how do i fix this error? i'm new at consuming social media API, and i've got standard apps on developers.faceboook.com

An accessToken issue using the Graph API

I'm trying to make a GET request from the Facebook Graph API, graph.facebook.com (using Postman, a Chrome application) to get all events containing the key word as below:
graph.facebook.com/v2.8/search?pretty=0&q=<MY_CITY>&type=event&accessToken=<MY_APP_ACCESS_TOKEN>
I'm having this response from Facebook:
{
"error": {
"message": "An access token is required to request this resource.",
"type": "OAuthException",
"code": 104,
"fbtrace_id": "B5KWVqr7ajK"
}
}
I've rechecked my app_access_Token, and it's fine and works for other requests. How can I fix this problem?
https://developers.facebook.com/docs/graph-api/using-graph-api/#search:
All Graph API search queries require an access token included in the request. You need a user access token to execute a search.

Facebook Graph Explorer Error Code 100 (OAuthException)

So I am inputting my correct access token and the correct ID, and when I use GET, it returns this error.
{
"error": {
"message": "(#100) Requires user session",
"type": "OAuthException",
"code": 100
}
}
When I use Get Access Token to get a test token, it returns the correct information. Why is this happening?

Graph API delete all scores

As stated in the Scores API documentation:
You can delete all the scores for your app by issuing an HTTP DELETE request to /APP_ID/scores with the app access_token for that app. This will reset the scores for your app. Use this if you'd like to periodically reset your game's scores and leaderboards.
So I go to Graph API Explorer and type /(APP ID OMITTED)/scores, Select DELETE method and paste in the app token I get from Access Token Tool in the access token field. I click submit and the following error is displayed:
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException",
"code": 1
}
If I paste in the user's token ID instead I get this:
"error": {
"message": "(#15) This method must be called with an app access_token.",
"type": "OAuthException",
"code": 15
}
What am I doing wrong?

Deleting a custom audience from an ad account

Facebook's documentation doesn't seem to cover it (https://developers.facebook.com/docs/reference/ads-api/custom-audience-targeting/).
Running:
https://graph.facebook.com/{audience_id}?method=DELETE&{access_token}
returns the following json:
{
"error": {
"message": "Unsupported delete request.",
"type": "GraphMethodException",
"code": 100
}
}
How can I do it, if possible?
The request did work for a different access_token. I must have had problems with the access_token permissions.