Google AdSense API explorer return all rows even when a maxResult as well - adsense

Have anyone else had a problem with Google AdSense API explorer returning all rows for a report even when MaxResult is set? It works for all other requests but not Accounts.reports.saved: generate.
https://developers.google.com/adsense/management/v1.4/reference/accounts/reports/saved/generate
I have tried it with my own code as well using this http request https://www.googleapis.com/adsense/1.4/accounts/{accountId}/reports/{reportId}?maxResults={MAX_RESULTS}
This will also return a full set of rows.

Related

Facebook Insights API Conversions are NOT matching Facebook Ads manager Results

When trying to fetch Facebook insights API for the following action offsite_conversion.fb_pixel_purchase I always get less number than Facebook show on their ad manager, I tried to inspect their network calls and URL structure and I see they're using the same field offsite_conversion.fb_pixel_purchase to show Results I am not sure why the numbers are mis-matching. I tried to query from the Graph API and from my shell with the same results.
You may check use_account_attribution_setting and use_unified_attribution_setting in here: https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-group/insights
Setting use_unified_attribution_setting to true worked for me.
I did some testing and found out that if you use an additional breakdown, FB will return less conversions. There might be a bug in their API when you use breakdowns.
I tried getting offsite_conversion.fb_pixel_purchase with
'breakdowns' => 'hourly_stats_aggregated_by_advertiser_time_zone',
and facebook retuned 5 conversions.
if I remove the breakdown and get the data grouped daily I get 11 conversions which is what Facebook Ads Manager shows

Facebook FQL posts limit issue

Currently i am using following FQL query :-
https://api.facebook.com/method/fql.query?query=select post_id,likes FROM stream WHERE source_id=XXXXXXXX LIMIT 0,10000&access_token=XXXXXXXXXXXXX&format=json
I have two Facebook Accounts / pages & able to download data using above API. Able to retrieve posts & post likes count.
But, from last three days, for one Facebook account above FQL query is not working. it is returning message :- "error": "Request failed" . For other account it is working fine.
For each facebook Account / pages i have generated separate Access Tokens.
But, if i update limit from : -
Limit 0,50
Limit 50,100
then it is working & returning posts from page but not returning all post which i have previously getting from Limit 0,10000
Please help me, if any one have idea about this issue ?
Thanks
Facebook will cancel queries which take too long or too many resources to execute. In general, I would never use LIMITs which are that high. There's a high probability that they will fail, and you can't really incfuence the query execution "load" other than setting the LIMIT to a reasonable number (which means implementing a paging mechanism).

Facebook API returns empty response only from specific IP

Suddenly simple Facebook Graph API calls started to return an empty result. The node I'm calling is a simple search page by name:
`https://graph.facebook.com/search?type=page&fields=profile_picture,username,id,name,likes,category,talking_about_count&access_token=<APP_TOKEN>&limit=10&q=stackoverflow`
It just started to return an empty result set when called from my server:
{"data":[]}
When I'm calling it from my personal computer browser, it works just fine.
I don't see any notification in Facebook Manage Apps page. What can be the reason? Is there any way I can see any error in this Graph API result?
UPDATE: suddenly it started working again, after it was down for at least 2 hours. Is there any way I can make these calls through client side JS? Any way to avoid to exposure of my APP_TOKEN?
UPDATE2: It stopped working again, and although I haven't identified the reason, I did figure when replacing the with a , it does work. The documentation actually says to use an APP_TOKEN.

Facebook graph API search https://graph.facebook.com/search?q=query&type=user with two keywords

If I perform a Facebook graph api search such as:
https://graph.facebook.com/search?q=query&type=user
Where query is just one word such as 'Mark' , everything is fine and there are results.
However if query is two words such as 'Mark Roberts' , there are no results returned.
I have tried using 'Mark+Roberts' and also tried using URL encoding with escapes but this does not help. However when I use two keywords and remove the &type=user, I get results (albeit a large amount of random facebook stuff).
So:
https://graph.facebook.com/search?q=mark&type=user < WORKS
https://graph.facebook.com/search?q=mark+robers&type=user < DOES NOT WORK
https://graph.facebook.com/search?q=mark+robers < WORKS (but does not return people)
Has anyone run into this issue?
Facebook do not seem to mention anything about this : http://developers.facebook.com/docs/reference/api/search/
NOTE: I am doing this of course with an authenticated APP ID and logged in user etc.
I tested with web browser and it works as expected.
The search according to "type=user" is deprecated now. See https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#search-4-4

Facebook graph api search results depends on location?

I've tried to fetch results using Graph search API and I've notice that the results when executed in my computer (Argentina) are different from the results when I run it in a server (France).
Is this like this? How can I force a location for a search?
Thanks #Sascha Galley. I also find another easy way.
Just add &locale=en_US in Facebook Graph search API query URL.
This is languages and locales list refrence
I don't know exactly which results are different and which skd version you are using, but one possible approach is to send the accept-language header with the cURL request. In the facebook api php file add the following line in the function makeRequest() below $opts = self::$CURL_OPTS;
$opts[CURLOPT_HTTPHEADER] = array('Accept-Language: en-us,en;');
This post is almost two years old: Get Facebook Graph API results in English
Actually, this issue should have already been solved: Return values from the graph-api depend on geographic server location