I am expecting the facebook comment from this URL
http://graph.facebook.com/comments?id=http://de.richarddawkins.net/articles/faschist-oder-nicht
But getting this error message
{
"error": {
"message": "An access token is required to request this resource.",
"type": "OAuthException",
"code": 104,
"fbtrace_id": "ABZp42kZtrD"
}
}
As the error message tells you, the API call requires an Access Token. You can use an App Access Token for this.
For example:
http://graph.facebook.com/comments?id=http:...&access_token=xxx
More information:
http://www.devils-heaven.com/facebook-access-tokens/
https://developers.facebook.com/docs/facebook-login/access-tokens/
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!
my app is in development
i am using below permissions:
"public_profile",
"publish_video",
"pages_show_list",
"pages_read_engagement",
"pages_manage_posts",
"publish_pages",
"user_managed_groups",
"groups_show_list",
"publish_to_groups",
"groups_access_member_info",
"publish_actions"
but on trying use the api to post photo in group and page i get below errors
https://graph.facebook.com/v12.0/{page-id}/photos?access_token=={token}&url={url.jpg}
error:
{
"error": {
"message": "(#200) The permission(s) publish_actions are not available. It has been deprecated. If you want to provide a way for your app users to share content to Facebook, we encourage you to use our Sharing products instead.",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "AW4L8qJL7HJWz9oTL7rk1IY"
}
}
https://graph.facebook.com/v12.0/{group-id}/photos?access_token={token}&url={url.jpg}
error:
{
"error": {
"message": "(#200) Insufficient permission to post to group",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "AsV2H45AICb6G7D73aiedW4"
}
}
Can someone please help with this
Solution for page post
follow this url for details: access_token
using user access token get page access token, pass this page access token in above url for page post
curl --location --request GET 'https://graph.facebook.com/v12.0/{page-id}?access_token={user-access-token}&fields=access_token'
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.
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?
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 ?