targeting live_videos using facebook graph API 2.8 - facebook

I've created a Live_Video following the instructions i've found here:
https://developers.facebook.com/docs/videos/live-video/production-broadcasts?locale=en_US#geotarget
with the API 2.8 using the following parameters:
planned_start_time=1512583432 and
targeting="countries": [ "CH" ]
got the following response:
{
"id": "1694620797236299",
"stream_url": "rtmp://live-api-a.facebook.com:80/rtmp/1694620797236299?ds=1&a=ATg9BhMPftTTsfv3",
"secure_stream_url": "rtmps://live-api-a.facebook.com:443/rtmp/1694620797236299?ds=1&a=ATg9BhMPftTTsfv3",
"stream_secondary_urls": [
],
"secure_stream_secondary_urls": [
]
}
so, everything seems fine, BUT:
How do i check that the vision of the video is actually restricted to
Switzerland ?
Where is this info stored ?
How do I retrieve it ?
Thanks for the help.
greetings-
cp

through the UI:
there is a gear wheel on the top part of the post that
responds to mouseOver with the geoblocking info of the livestreaming
If the livestreaming is blocked it reflects there.
Still working on getting the same info from the API ...

Related

Google Smart Home SYNC throws error : Couldnt update the setting. Please check you connection

I've hit a brick wall with my Google Smart Home integration due to an error after my Smart Home SYNC process which only says "Couldn't update the setting. Please check you connection" as follows:
I've done the Alexa Smart Home integration successfully and have been trying to setup Google Home the same way, using a similar endpoint setup.
I'm receiving the request body as follows:
"body": "{\"inputs\":[{\"intent\":\"action.devices.SYNC\"}],\"requestId\":\"4411034480302599483\"}"
And here is my response:
{
"requestId":"4411034480302599483",
"payload":{
"agentUserId":"xxxx",
"devices":[
{
"id":"1234",
"type":"action.devices.types.SWITCH",
"traits":[
"action.devices.traits.OnOff"
],
"name":{
"defaultNames":[
"Projector Light"
],
"name":"ProjectorLight",
"nicknames":[
"Projector Light"
]
},
"willReportState":false,
"deviceInfo":{
"manufacturer":"TalentPace",
"model":"442",
"hwVersion":"3.2",
"swVersion":"11.4"
},
"customData":{
"fooValue":0,
"barValue":false,
"bazValue":"DV19000275"
}
}
]
}
}
I've run my response through the JSON validator and it shows the "no errors found" message.
The StackDriver logs show a BACKEND_FAILURE error:
I've looked around on the web and this issue seems common. People have been suggesting trying this on new devices. I've tried that as well with no luck.
My endpoint is running on dot net core 2.0 and I'm returning the above JSON by converting a model binded object using NewtonJSON as follows:
return JsonConvert.SerializeObject(body);
The same setup worked fine for Alexa. At this point I'm not even sure if the issue is with my code or on Google's end. Any help would be much appreciated.

Facebook analytic export always return "SCHEDULED" when call check status

Im new on getting with facebook api. When i try to use facebook analytic export API, i got FBID then I query status but it always return "SCHEDULED" status, on facebook api document, they said it will take about 1 -> 2 hours, but it waiting for about 3 days but it not change.
This is API link:
https://developers.facebook.com/docs/analytics/export/
This is a example of request i made in today at 2017-10-09 04:10 UTC
"data": [
{
"id": "352212478559555",
"start_ts": "2017-10-07T08:00:00+0000",
"end_ts": "2017-10-07T09:00:00+0000",
"status": "SCHEDULED",
"column_names": [
.....
}
Anyone faced with this problem? i already searched on google but no luck :(
This problem have been resovled. I have sent support ticket to facebook and problem is facebook export system too busy and it have delay time.

How to set the tracking_specs when creating Facebook ads?

I am trying to create an ad using the Facebook Marketing API. In order to create an ad inside a conversion based campaign, I am required to set proper tracking_specs values.
Querying existing ads (on other similar campaigns) I see the tracking spec is generally defined as follows:
"tracking_specs": [
{
"action.type": ["offsite_conversion"],
"fb_pixel": [<pixel ID>]
},
{
"action.type": ["post_engagement"],
"page": [<page ID>],
"post": [<post ID>]
},
{
"action.type": ["link_click"],
"post": [<post ID>],
"post.wall": [<post.wall ID>]
}
]
How do I find the required tracking_specs values? More specifically, how do I find the post ID and the post.wall ID accordingly for post_engagement and link_click action types?
I managed to figure it out on my own. When creating a new ad, in a conversion typed campaign, an ad data object that includes tracking specs should be provided. These tracking specs should include some reference to a Facebook pixel.
"tracking_specs": [
{
"action.type": ["offsite_conversion"],
"fb_pixel": [<pixel ID>]
},
]
The pixels data can be obtained manually via the Facebook Business Manager or via the Facebook Marketing APIs:
GET /v2.10/{ad-account-id}/adspixels HTTP/1.1
Host: graph.facebook.com
Read more in https://developers.facebook.com/docs/marketing-api/reference/ad-account/adspixels/
Regarding the post and post.wall IDs - these are automatically added by Facebook when the ad is created. So there is no need to include theses when creating the ad.
For anyone searching for an answer in 2023. asaf's answer is totally correct BUT you also need to wait until Meta Business Manager processes your campaign in order to see tracking_specs into the API and in the Business Manager itself.

Facebook API page_impressions/page_storytellers by age_gender return empty array

i am currently working with the Facebook API pulling data for an analytics platform, i have managed to retrieve everything Facebook has to provide but when it comes to
332405516848997/insights/page_impressions_by_age_gender_unique
332405516848997/insights/page_storytellers_by_age_gender
332405516848997/insights/page_storytellers_by_country
the following calls return :
{
"data": [
],
"paging": {
"previous": "https://graph.facebook.com/332405516848997/insights/page_impressions_by_age_gender_unique?since=1374763564&until=1375022764",
"next": "https://graph.facebook.com/332405516848997/insights/page_impressions_by_age_gender_unique?since=1375281964&until=1375541164"
}
}
My access token has the required permissons (manage pages, read insights).
I am using the Facebook Graph API explorer.
Any help would be greatly appreaciated.
Thanks in advance.
After digging to the earth's core and back i stumbled upon the following :
Note: That start and end dates can be applied using since and until unix timestamps based on midnight in PST described in UTC.
Turns out it was the midnight pacific time range that was causing the issue.
Docs

Interfacing with wall/feeds

This is the first time I'm trying to develop a facebook app so sorry in advance if my question is too naive.
What I need to do is making a chat-like facebook application where:
the user can write something on the wall
the app should be able to detect this event and send an HTTP request to an external web service of my own which will provide a response (text)
publish that text as a comment
the user should be able to continue the dialog by entering another comment(s) (in which case we go back to step #2)
Basically, this would be very similar to:
https://www.facebook.com/SkyscannerFlightSearch
I think one (ugly) way to do this would be making a script which searches for new wall entries/comments and posts replies in an infinite loop by using the Graph API but it's obviously sub-optimal and expensive.
Is there any way to have facebook call a certain url every time a wall post/comment is entered?
Or maybe something like Twitter's streaming API based on long-polling technique?
Am I in the right direction by assuming such kind of solutions or I'm totally missing the point?
Thanks in advance.
Giampaolo
I am working on something very similar myself.
So far i have the "loop" which can be set to any page, group or app on facebook.
SAMPLE: https://shawnsspace.com/plugins/wallfeed.php My page wall.
SAMPLE: https://shawnsspace.com/plugins/wallfeed.php?pageid=19292868552&ptype=feed&limit=40 Facebook Platform Wall.
With some perms, a form and user access_tokens i can make the wall postable. Asper UGLY - you do not need to run this in a loop, Facebook supports realtime updates and will send a response to your app when a user, or page has made a change.
MORE: http://developers.facebook.com/docs/api/realtime
Thanks for the input.
I tried to use the real-time API by using object=user and fields=feed.
If I understood the doc correctly this should result in my callback url being called (POST) every time a user writes something on my app's wall.
I received the initial GET request but never POST.
This is the current configuration:
{
"data": [
{
"object": "user",
"callback_url": "http://XXX.XXX.XXX.XX:8888/",
"fields": [
"feed"
],
"active": true
},
{
"object": "page",
"callback_url": "http://XXX.XXX.XXX.XX:8888/",
"fields": [
"picture"
],
"active": true
}
]
}
I've noticed various user comments reporting different concerns about the reliability of this API.
Also, here:
http://developers.facebook.com/docs/reference/api/page/
it says: "Note: Real-time updates are not yet supported for the total number of Page checkins."
...which I'm not sure what it means exactly.
For the record, my app's page I'm using for tests is:
http://www.facebook.com/pages/testgiamp/187148861354102?sk=wall