I am using fb marketing api to retrieve the insights.
request format
v8.0/{account_id}/insights?level=ad&date_preset=last_30d&action_attribution_windows=['28d_click','28d_view']&fields=account_id,account_name,ad_id,ad_name,conversions,conversion_values,cost_per_conversion,cost_per_action_type,actions&breakdowns=age,gender
here i am requesting conversions field but not getting it.
I have tried all the breakdown combinations listed in fb marketing api breakdowns doc
I want to retrieve the conversions field from the API. Is there anything that i am missing ?
Appreciate all your feedbacks.
Thanks
I was able to retrieve the data using same API call.
Turns out fb will return the conversions data only when there is any data to return.
what is counted as conversion - somebody subscribed after clicking on the ad, that will be counted as conversion. Viewing the post is not counted in conversions.
also api call should have the param action_report_time=conversion to retrieve the conversions(mixed/conversions both works here).
Related
Im trying to use the Facebook graph api on rails to find for a specific post who shared it. Looking through the documentation and the api data it doesn't seem that this information is available for a specific post. I am able to get the likes and comments information, however not the shares.
Would anyone know whether the current Facebook Api gives that information? Thanks
Using Graph API, do a request to graph.facebook.com/POST_ID?fields=sharedposts.
Iterate through the resulting array to get the sharers' identity.
Example in Python here.
I am looking for a way to record user id's of a public post for a brand. If there are any resources available, any help would be appreciated.
Retrieving share data with FB API doesn't seem to be officialy supported by Facebook, but you can retrieve posts shares with Graph API, just do the following:
Get the ID of your post (eg. /me/posts query)
Split the ID on underscore character and get the second part (first part indentifies posts author)
Query the shares: [id_2nd_part]/sharedposts
Note that since it's not officialy supported it may stop working at some point in the future
You can test it with Graph explorer - to get shared posts you need read_stream permissions on your access token if I'm not mistaken
I am using the Facebook graph API with queries like:
https://graph.facebook.com/search?q=term&type=post&access_token=XXXXXXXXXX
but I am getting different results when I execute a query via graph API and via the Facebook web...
I am using the same user (I get a access_token from the same user that I uses to search via web).
I tested this text query with dif. browsers and with a java client and I have the same problem....
I was searching information about this topic, but It was impossible to find something.
Finally, I'd like to ask if someone know how this query customizes its results and if it is possible to parametize it.
Regards.
Update:
I am testing a query as:
https://graph.facebook.com/search?q=mark&type=user&access_token=XXXXXXX
but I don't receive results. I don't understand how it is possible which Facebook doesn't find users named Mark..... I suppose I have to use some parameter (fields, f.e)... But It is not explained in the documentation....
I am trying to read a user's stream using the facebook graph api. the call is:
https://graph.facebook.com/me/home?access_token=xxxxx&since=yyyyy
I am getting a response but there are a few problems:
Why in the response are some of the posts missing? (whether i am using the parameter "since" or not) I.E. the result I get as a response is not identical to the stream I see as a facebbok user (many posts are missing)
It seems that even if I use the "since" parameter, many of the posts returned are out of the time scope. Any ideas why? I would like to do paging according to specific time periods but it seems facebook api is not working as expected.
thanks
This is because of individual user's privacy settings.
I am using facebook insights for showing fan page analysis in my application. Since the last upgrade by facebook on 1st week of Oct 2011, i am facing issues with 'page_fans_gender_age' data values served by the Insights API. I am using graph API for this. We fetch the insights JSON on daily basis, but most of the times it do not provide values of 'page_fans_gender_age' parameter. The behavior is random, sometimes it served the required data and sometime it do not.
Anybody facing the same problem?
Yes, I'm facing a very similar problem.
Right now, I'm just simply trying to get some JSON returned from facebook, using JavaScript / AJAX and the GET method.
Are you using the Graph API? If so, how do you attach your extended permissions token to the call to facebook's read_insights?