facebook lead details retrieval from lead gen id - facebook

I am unable to get lead details from lead gen id that gets generated using webhook. Although I have admin access and lead retrieval access I get the following message when tried to access lead details from lead gen id
"message": "(#200) Requires leads retrieval permission to manage the object", "type": "OAuthException",

I hope it's useful, I had the same problem.
The api must be active and published in addition to revised with approval.
Then access a new version of the Graph API browser
https://developers.facebook.com/tools/explorer/?classic=0
must give the correct permissions to the Token
Permissions = leads_retrieval
a greeting

Related

Unsupported get request. Object with ID 'XXXXX' does not exist, cannot be loaded due to missing permissions, or does not support this operation

I want to use User Profile API from Facebook to get customer user data (first name, last name, picture). My app is reviewed, my app is connected to fanpage, i have pages_messaging and other permissions active. Webhooks are working correct, i receive messages from user and i can respond to them, yet when i use PSID from webhook and use it on this endpointhttps://graph.facebook.com/v9.0/{PSID} i get this error:
"error": {
"message": "Unsupported get request. Object with ID 'XXXXX' 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}
Am I missing some permissions? Bad app/page configuration? I've been trying to find something in documentation but right now i'm defeated by it.
I solved the problem with getting additional permission Business Asset User Profile Access (api 8.0+).
I had the same issue, one probable reason is that you need to pass the account ID with 'act_' at the beginning of it so it becomes 'act_XXXXX'.
I was having the same issue, the main reason is that you need to pass the account ID starting with
'act_'
at the beginning
of it so it becomes
'act_XXXXX'
This resolved my issue. Hope so resolves everyone's who is coming to find solution for it.
Looks like you cannot make this request on behalf of Test User. If it is your case, try to make a call from Tester's Role user account instead.
For real life application you need Business Asset User Profile Access
There can be multiple reasons to it, you need to check the status of your account by visiting the Alerts Page on this url: https://developers.facebook.com/apps/<APP_ID>/alerts/inbox/?business_id=<BUSINESS_ID>
This alert page would show you the issue/permissions denied, for example:

Facebook Server-Side API (Marketing API)

First of all - sorry for my english, not my primary language.
We are trying to send some Pixel events from server (not from user browser), so we have an instructions from facebook: https://developers.facebook.com/docs/marketing-api/server-side-api
But stuck on step "Create Access Token", this section (Server-Side API for Web) is missing in Pixel's settings.
Also when we trying to make request to graph api to send some events we getting this error:
{
"error": {
"message": "(#3) This pixel is not enabled for this capability: SERVER_SIDE_EVENTS_CORE_FUNCTIONALITY",
"type": "OAuthException",
"code": 3,
"fbtrace_id": "AEWB5WGs0g_e21p2Qd1kZsX"
}
}
Is anyone managed to resolve this issue?
Mindesik,
At least before you had to be whitelisted (approved by FB) to be able to use server-side API from FB. It's usually not explicitly mentioned on the FB dev portal. If you have an FB representative for your business, try to ask them. Looking at the docs it looks quite promising, so the things might have changed.
Still, in case you've followed all the steps correctly and still getting this error this is most probably whitelisting issue that is implicitly required. The problem here is that to make FB aware of users associated with the events you send you have to send Personally identifiable information (PII) which would be a subject of strict compliance according to local laws in the EU and the US.
Here is what is says to me about debugging S2S events:

product catalog api fail

need help.
I tried to start with https://developers.facebook.com/docs/marketing-api/dynamic-product-ads/ads-management/v2.3
created account. Approved it by phone.
created a business account, an ad account, an app, and so on.
linked app to ad accont like this https://developers.facebook.com/docs/marketing-api/access#standard_accounts.
Now i tried to create product catalog. i am getting same error all the time:
The app is not whitelisted to use this API
i tried to call api to cteate/list/managment product catalog.
when i did, the same by UI - i can create product catalog & feed.
but by API - all time error.
i do not understand what it need?
now try to create product set:
GET /<product_catalog ID>/product_sets/?
access_token=<my access token from app with full rights get from exploer>
{
"error": {
"message": "(#200) The app is not whitelisted to use this API",
"type": "OAuthException",
"code": 200
}
}
try to create the same:
POST : /v2.3/<product_catalog ID>/product_sets/?access_token=<my access token from app with full rights get from exploer>&name=my new prod set
{
"error": {
"message": "(#275) Ad account cannot be determined for this request",
"type": "OAuthException",
"code": 275
}
}
So what Are the changes i needed to make it work?
is it any way to made api calls work correctly?
p.s.
i guess something wrong in settings - i run unit tests in SDK - have the same situation. i have read about that problems with game app - but my app - is not a game, so i cant use solution in my situation.
if some body understand what whitelist API want - please help!
Thanks.
Hopefully this helps someone else: I was also trying to create a Product Catalog via the API in Development, and got "The app is not whitelisted to use this API".
I solved it by creating an admin system user, and generating an access token with the business_management permission.
The error is explained by the documentation you linked to - unless your app is approved for Standard access to the API it can only access a specific number of ad accounts and those accounts need to be pre-configured in the app settings
Many of the business manager APIs can't be used because they're not tied to one of those pre-specified accounts (hence the Ad account cannot be determined for this request error).
In general, the business manager APIs likely won't work for you until your app has access at the standard level, though some will if they're account-specific
You can't be an app admin and a tester/developer at the same time. You should create another facebook account for tests.
This happens also when the access token used is not from your app which has Standard Access. Also, note the dev version of the same app will not work.

Cannot access application using the specified access_token

I am using Facebook long time tokens(2 months), but FB starts to be nondeterminic and gives me sometimes this return
{
"error": {
"message": "Cannot access application using the specified access_token",
"type": "OAuthException",
"code": 1
}
}
I am using PHP SDK.
I am using this link to get 2 months token
https://graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=APP_SECRETgrant_type=fb_exchange_token&fb_exchange_token=SHORT_TIME_TOKEN
Any ideas?
I was experiencing this issue, and got some support direct from FB staff. The most likely cause of this error is "demographic checks" for the user.
Our app had an age-gate as it was alcohol related. Certain users' profiles did not contain enough information for FB to ensure they were above the drinking age for their location, so the session creation failed. Why this only happened on this call and not on earlier ones, I don't know.
Does your app have an age-gate, or anything similar?
You have the missing & between APP_SECRET and grant_type.
Also, there seem to be a Fb bug on this issue - http://developers.facebook.com/bugs/536272816386515?browse=search_50a37bb1c333b4253892226
Be sure that you extend the tokens immediately after you get the "SHORT_TIME_TOKEN". You can extend user tokens only ( not page tokens ). Be sure that you get a correct "Short time token" before you extend it.
Also, check for "sandbox mode " in your app. It may cause problems when extending tokens. Try switching it to "false".
Hope that helps.
Your query is missing an & after APP_SECRET, before grant_type. It should read:
https://graph.facebook.com/oauth/access_token?
client_id=APP_ID&
client_secret=APP_SECRET&
grant_type=fb_exchange_token&
fb_exchange_token=SHORT_LIVED_ACCESS_TOKEN
Source: Extending Access Tokens on Facebook Developers.
Edit: If the OP means that out of the current app user base, some users experienced expired sessions and reported the issue, the wrong query string is a possible explanation.
The error would result in the access_token not being extended, but log-in will be still be granted with the shorter-lived access token. In this case the faulty query string was in the code base all along, but was only discovered when live users' access_tokens expired earlier than expected, coinciding with "the app [..] used by many people".
If the OP means that using the correct query (and not the one stated in the question) out of many calls from the same client a subset returns with error, then my explanation isn't valid.
It sounds as if some of your users are erroneously being issued tokens that have a short lifespan instead of the extended ones you ask for.
It is possible you have stumbled upon a known bug with the extended access tokens. Check this bug report on facebook for more information about it as well as this question, although to my knowledge there's no real workaround.

What are the possible causes for Facebook's "Error validating application"?

My application uses Facebook's Graph API to pull user's information via /me, /wall, and so forth.
Sometimes users run into the error:
"error": {
"message": "Error validating application.",
"type": "OAuthException",
"code": 190
}
I can't find any reasons why this might be triggered as:
Access token is valid, never-expires, and is associated to my
application.
I got the permissions to do the API calls
API calls works fine afterward
In this condition, what might cause this?
Assuming you're receiving this error only for a small percentage of requests, you shouldn't need to do anything - the error happens when the provided access token is being checked for validity and the app's details can't be verified - usually an intermittent problem affecting only a tiny percentage of requests (unless you're forgetting to include the app ID in your SDK initialisation, in which case check that first)