I'm trying to achieve the following:
User logs in on my website using a custom Facebook Login
User creates a post on his wall using the feed dialog from my website
I store the post_id in a database
I need to query the post in order to get the number of likes it got with FB API
The problem is that Facebook new application review won't authorize my application to use the read_stream permission since it's in a website (as their policy says)
It seems (as on documentation) that I can retrieve a single post (published as "public") with just a valid user access token; but the Open Graph Explorer tool responds with this:
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100
}
}
Is there a way I can query a single public post with just a valid access token and without read_stream permission?
Or is there a way I can use the read_stream permission on a website?
Thank you in advance for your help!
Related
I have created a facebook business page and i want to get some posts over the graph api.
I have set everything up (Developer App, Token...).
I get this error when I make an http request:
{
"error": {
"message": "Unsupported get request. Object with ID '492303394120348' 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,
"fbtrace_id": "DxgFcxGEl2Y"
}
}
When i am using the page-id of another facebook page it is working.
What is the problem here. Can someone please help me?
App Tokens are not a good way to access a Page with the API. If the Page is restricted by age or location, you need a User Token of a user who is able to see the Page, or a Page Token of that Page. You should always consider using a Page Token.
I have admin access to a Business Facebook page, I created an app under the same account, when I then try to use the Graph API Explorer under that application using the access token generated I get:
get/v2.5/{client-name}/
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100
}
I have full access so I do not know why I am getting a error. This normally works fine when I try it on a standard Facebook page, is there something extra I need to do for Business pages?
Since you are trying with an App Token, i assume that the Page is restricted by age or location. In that case, you have to use a User Token or Page Token of a user who is allowed to see the Page and its content.
More information about Tokens:
https://developers.facebook.com/docs/facebook-login/access-tokens
http://www.devils-heaven.com/facebook-access-tokens/
I have a comment interface that needs to show peoples Facebook profile pics and names. When I try to get the info using /me in the graph API it works. But if I use someone else's userID I get an 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": "EY/oRYYby2u"
It works if I am friends with the other person, so is not being friends why this doesn't work? They have both authorized the app. Do I need to server side store everyone's access tokens and use the corresponding token to access the data I need?
If you have the app token you can get name of each user connected to app.
https://graph.facebook.com/userID?access_token=App_token
I am attempting to access Facebook API data on photos I am tagged in, (uploaded by other users). I am using this URL format:
https://graph.facebook.com/[photo-id]?access_token=[access-token]
The access tokens I am using are definitely valid, having logged in with my account and having granted user_photos permission. Some photos this works fine, and it returns the API data. However for other photos it returns 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
}
}
I can't work out why some photos return this error. Some of the photos producing this error are public and some aren't. As I understood it, I should be able to access all photos I am tagged in through the API once I have granted the user_photos permission.
Update: The same applies when using the Graph API Explorer tool. I use the Get Access Token button to generate an access token with user_photos permissions. I get the same error message, even on photos shared with public, e.g. this photo id 10152429955981023
Update: The same photos also seem to be missing when I query /me/photos.
I'm having problem fetching post by post id using Graph API.
In Graph API reference (https://developers.facebook.com/docs/reference/api/post/) it says that:
Querying without the read_stream permission will return only the public view of the data (i.e. data that can be see when the user is logged out).
I'm able to open https://www.facebook.com/franzee/posts/10151947780174121 without logging in to Facebook, but when I try to access this post using Graph API or Graph API Explorer I get the following error
{
"error": {
"message": "Unsupported get request.",
"type": "GraphMethodException",
"code": 100
}
}
I am using valid token and Graph API call, and I'm getting results when fetching single posts from group or public page. Why is then error message returned when I try to fetch post by post id even though the post is visible when I'm logged out?
You can't access a user's posts without a user access token from a user who can see the posts - even if a post is marked as 'Public', that means Public to Facebook users, not completely public via the web and API - You still need to provide the access token of the Facebook user you're fetching the posts on behalf of