How to receive & process data when I subscribe to youtube api v3 push notification? -


according https://developers.google.com/youtube/v3/guides/push_notifications

i can subscribe youtube channel & receive push notification new video.

my callback server php script interprets post/get data:

<?php if (isset($_get['hub_challenge'])) {   print $_get['hub_challenge']; } else {   $xml=file_get_contents("php://input");   file_put_contents('endpoint.txt',$xml); } ?> 

but $xml empty. in docs says:

the youtube data api (v3) supports push notifications via pubsubhubbub, server-to-server publish/subscribe protocol web-accessible resources. notifications pushed out subscribers via http webhooks, more efficient polling-based solutions.

but not specify how send data....whether in post body or in somewhere else.

so how atom feed in script?


edit: should ask new question this...but anyway....i tried channel (https://www.youtube.com/channel/ucatp8lntjzjnllxdarp0myg); when try subscribe says "restricted topic" (i did not provide token public channel). same other channel id. wrong callback server? tried runscope url callback server testing. did not help.

others having similar problems. here issue log:

https://code.google.com/p/gdata-issues/issues/detail?id=7138

and related stackoverflow question:

youtube api - subscribing push notifications

unfortunately, no 1 seem provide solution although can follow issue , track progress.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -