Query regarding Facebook Places Graph API - facebook

I'am using graph API in my application. Recently I have come up with a trouble retrieving places using Places API.
When I try to retrieve locations using places API I'm not getting response as expected, please let me know in case if I'm missing out some steps.
url used in app is:-
https://graph.facebook.com/search?q=Paris%2c%20France&type=place&center=48.8567,2.3508&limit=20&distance=100
What is the minimum value of the distance to be specified?
As I'm able to get more places if I increase distance value from 100 to 1000

Playing with the Graph API explorer, there doesnt seem any specific value that can be used as minimum value while querying. Since using specifying 1 I still seem to be able to fetch the results, as of now the maximum value that you can specify seems to be 50000m for place queries.

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

Get Post Insights for multiple posts in one call using Graph Api 2.7

I am trying to get post insights for a page feed using Facebook Graph API version 2.7 ..
If I only write:
'[Page ID]/feed?fields=insights'
It asks for metric, which indicates it should work... But when specifying a metric:
'[Page ID]/feed?fields=insights/post_impressions/lifetime'
I get syntax error.
I've tried with . notation as:
'[Page ID]/feed.insights/post_impressions/lifetime'
But stil no luck!
I know I can do it post by post (separate calls to API), but that is what I'm trying to avoid.
Anyone know what the correct syntax is for nested insights?
This bug report was able to shed some light: https://developers.facebook.com/bugs/1755454881375647/
You can use the metric keyword to specify the metrics you want, like so:
/page-id/posts?fields=insights.metric(post_impressions,post_consumptions_unique)
Name the metrics you are interested in there, and separate them with a comma.
Specifying the period (where applicable) seems to work by the same kind of syntax,
/…?fields=insights.metric(…).period(lifetime)
(Although it might not work to request different periods for different metrics in one go.)

Facebook API call for places with limited results

I'm trying to pull all the Facebook public events in my city through graph-API calls, to do that I believe that first I need to get all the places near by a point and then for each place get the events happening there. Is this correct?
Anyhow, when I try to get the places my API call returns only somewhere between 350 - 450 places depending on the center point. I know there are more than that.
My API call is:
/search?type=place&center=31.7570810,-106.4890170&distance=15000&limit=5000
Is there any limits for searching places Im not aware of?
Thanks in advance

Why does this SoundCloud API method not retrieve all tracks?

I'm attempting to retrieve all of my favourited songs from my profile on SoundCloud using the SoundCloud API method /users/{id}/favorites.
After registering my application with SoundCloud and retrieving my ClientID, I can successfully retrieve an array of favourited tracks in JSON using a call to http://api.soundcloud.com/users/goodforenergy/favorites?client_id={my-client-id}.
Looking at my SoundCloud profile, however, you can see I have (at this moment in time) 182 likes - but the method is only returning 48.
Any ideas as to why? I thought there may be a next_href returned in the JSON that I was expected to follow to retrieve more, but I don't see any. In any case, 48 seems a very arbitrary number to return!
According to soundcloud api docs most of the results in the API are returned in collections which are limited by default to a size of 50. I realize that it's peculiar that you are seeing 48 rather than 50 but it's probably worth modifying your call to support pagination.
Most endpoints support a linked_partitioning parameter that will allow you to page through collections. When this parameter is passed, the response will contain a next_href property if there are additional results.
So you need to update your API call to include the linked_partitioning and limit parameters in order to recieve a next_href.

In Facebook Graph API - Is LIMIT parameter realy functional?

I'm trying to collect all the posts of my company page with this kind of query
https://graph.facebook.com/v2.2//feed?limit=250&fields=id,type,status_type,comments{id},likes{id},shares
Problem is that I'm not collecting all posts.
I will have a better result with limit=20 and some time with limit=100
Most of the pages (from the pagination mechanism point of view) will not have 100 items.
I know some posts may not be exposed because of privacy settings.
My issue is that a call with limit=20 is not returning once going through pagination the same amount of data as limit=250.
How could it be?
How providers of Facebook Analytics can garanty the quality of data they collect ?
The Facebook graph api only allow the max of 100 items per request, despite you specify more than that.
Afaik the limit parameter is indeed buggy. But 250 would be a very high value, there is a max value for the parameter too - i assume it depends on the API call how high it is, could be fixed too.
Better don´t use limit at all and use paging to get more results: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2#paging