I'm trying to get page data as the Administrator of my Facebook App but I'm getting error #10: To use 'Page Public Content Access', your use of this endpoint must be reviewed and approved by Facebook.
I thought that as an Administrator I would have access for testing purposes? Is my request incorrect? I've made this as simple as possible by using JavaScript, so no server side code at all.
My AppID and AppSecret are as defined on the Settings/Basic page of https://developers.facebook.com
Please advise:
var getAccessTokenURL = 'https://graph.facebook.com/oauth/access_token?type=client_cred&client_id='+appID+'&client_secret='+appSecret;
httpGetAsync(getAccessTokenURL, function(text) {
var json = jQuery.parseJSON(text);
var accessToken = json.access_token;
var url = 'https://graph.facebook.com/' + pageID + '/feed?access_token=' + accessToken;
httpGetAsync(url, function(text) {console.log(text);})
})
My response is:
{
"error": {
"message": "(#10) To use 'Page Public Content Access', your use of this endpoint must be reviewed and approved by Facebook. To submit this 'Page Public Content Access' feature for review please read our documentation on reviewable features: https://developers.facebook.com/docs/apps/review.",
"type": "OAuthException",
"code": 10
}
}
Apologies if this is obviously or has already been asked, I've had a look but cannot find clear documentation about this
Thanks
You need to use a Page Token, and test with a Page you manage.
Links:
https://developers.facebook.com/docs/facebook-login/access-tokens/#pagetokens
https://developers.facebook.com/docs/apps/review/feature/?locale=de_DE#reference-PAGES_ACCESS
To get api access to public published page data:
Create an app for the facebook page:https://developers.facebook.com/apps/
Generate a "User Access Token": https://developers.facebook.com/tools/explorer/
Extend the token to be used for 60 days: https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token&client_id=APP_ID&client_secret=APP_SECRET&fb_exchange_token=ACCESS_TOKEN
Where APP_ID and APP_SECRET are on the Facebook app under Settings->Basic
Get page info: https://graph.facebook.com/v3.2/PAGE_ID?access_token=ACCESS_TOKEN
Get posts: https://graph.facebook.com/v3.2/PAGE_ID/feed?access_token=ACCESS_TOKEN
Related
Can anyone help me how to get my page like count of facebook to show on my website. I have tried
https://graph.facebook.com/<YOUR_PAGE_NAME>/?fields=fan_count&access_token=<EAAUo6u... - YOU_ACCESS_TOKEN>
but not able to get data. Error shows :
{
"error": {
"message": "(#10) To use 'Page Public Content Access', your use of this endpoint must be reviewed and approved by Facebook. To submit this 'Page Public Content Access' feature for review please read our documentation on reviewable features: https://developers.facebook.com/docs/apps/review.",
"type": "OAuthException",
"code": 10,
}
}
https://developers.facebook.com/docs/apps/review/feature/#reference-PAGES_ACCESS
You can either use a Page Access Token of your Page, or you need to go through review in order to get access with an App or User Access Token.
I'm trying to fetch the public photos I've posted on my facebook page.
With that, I plan to make a caroussel on my website that displays the photos I posted on my facebook page.
Using the facebook Graph API, I ended up with this:
my-page?fields=albums.fields(photos.fields(source))
The thing is that the response I get is:
{
"error": {
"message": "(#10) To use 'Page Public Content Access', your use of this endpoint must be reviewed and approved by Facebook. To submit this 'Page Public Content Access' feature for review please read our documentation on reviewable features: https://developers.facebook.com/docs/apps/review.",
"type": "OAuthException",
"code": 10,
"fbtrace_id": "DxhgQ12ym3r"
}
}
I've tried to get the app reviewed, but at certain point they ask me to attach a video in which I show how the final user will use the app. But this is a server-to-server app, so I don't understand how am I supposed to answer that petition.
I've also tried to get a page access token, but I get the following error:
Invalid Scopes: manage_pages. This message is only shown to developers. Users of your app will ignore these permissions if present. Please read the documentation for valid permissions at: https://developers.facebook.com/docs/facebook-login/permissions
I'm quite lost, if anyone could guide me a bit or explain me step by step how to reach my goal...
Yesterday on the Facebook Graph API tool I could create an access_token without having to own an App then get posts/publications via {page-id}/posts or {page-id}/feed.
Today, first thing when I arrive on the Facebook Graph API tool is that I have to create an application to have access then after creating it with the same operation than before it returns me an error like this
{
"error": {
"message": "(#10) To use 'Page Public Content Access', your use of this endpoint must be reviewed and approved by Facebook. To submit this 'Page Public Content Access' feature for review please read our documentation on reviewable features: https://developers.facebook.com/docs/apps/review.",
"type": "OAuthException",
"code": 10,
"fbtrace_id": "FJ52hd03hq"
},
"__debug__": {}
}
Then I went see someone owning a verified application so I can try with an access_token generated with his application. The result is the same.
Anyone facing the same problem ? Did I missed something ?
Is it possible to post user reviews to a FB page via an API?
I want to have an app on a phone that will let users review my business when they walk in to my store.
Edit:- This is what I've tried so far.
I used the passport module in Nodejs for authentication and was able to retrieve the access token from FB, including manage_pages, publish_pages and read_insights.
app.get('/auth/facebook', passport.authenticate('facebook', { scope : ['email', 'manage_pages','publish_pages','read_insights' ]}));
My passport strategy has this
clientID : configAuth.facebookAuth.clientID, //my app's client id
clientSecret : configAuth.facebookAuth.clientSecret, //my app's client secret
callbackURL : configAuth.facebookAuth.callbackURL, //the callback URL after authentication
profileFields: ["emails", "displayName"]
I am able to post as the page using the NPM FBGraph module.
var graph = require('fbgraph');
graph.setAccessToken(req.user.facebook.token);
graph.post("{My page's ID}/feed", "Message test", function(err, res) {
console.log(res); // { id: xxxxx}
});
This lets me post the "Message test" to my page's feed.
I am not able to find a reference to post reviews for the page through the Graph API though and was wondering if that is possible.
https://developers.facebook.com/docs/graph-api/reference/page/ratings#Creating
You can't perform this operation on this endpoint.
Meaning, it´s not possible. Not sure what you would do with publish_pages though, because ratings/reviews are made by users, not by pages...If it would be possible, then only with publish_actions.
tried to send post to facebook api to scrape my page at load.
http://i.stack.imgur.com/3Jd0y.png
what is wrong with my code?
This is how you use FB.api:
FB.api('/', 'post', {
id: 'url-to-scrape',
scrape: true
}, function (response) {
console.log(response);
});
Not sure where you got that code example from, but you should always take a look at the Facebook docs.
I you are getting invalid token means your token is not correct let me tell you how to generate token it is simply by combining your app id and app secret gotten on Facebook developers app dashboard after you have signed up check here and read url and to check errors faster on your code api, download post man here www.getpostman.com, put in your api call code in the url bar and hit send it will tell you your error. Then to get token for facebook fancount,pageid,likescount, you can do a search for more info on graph.facebook.com on google. contact me if there is problem.
$appid = "xxxxxxxxxxxxxxx";
$appsecret = "yyyyyyyyyyyyyyyyyyyyyyyyy";
//get it from your dashboard
$token = $appid .|. $appsecret key