I am using this php library for flickr. I have added following flickr push_subscription function:
function push_subscribe ($topic = NULL, $callback = NULL, $verify = NULL, $verify_token = NULL, $lease_seconds = NULL, $tags = NULL) {
return $this->call('flickr.push.subscribe', array('topic' => $topic, 'callback' => $callback, 'verify' => $verify, 'verify_token' => $verify_token, 'lease_seconds' => $lease_seconds, 'tags' => $tags));
}
After that have subscribed to push notification with topic set as "tags":
$res = $f->push_subscribe("tags", "http://mysite.herokuapp.com/flickr/push-notification.php", "async", NULL, NULL, "personal");
After subscription with getsubscription i got response like:
[0] => Array ( [topic] => tags [callback] => mysite.herokuapp.com/flickr/push-notification.php [pending] => 1 [date_create] => 1435469765 [expiry] => 0 [verify_attempts] => 1 )
[stat] => ok
My callback url is a php script on my site:
<?php
if (isset($_GET['hub_challenge'])) {
print $_GET['hub_challenge'];
}
else {
$xml=file_get_contents("php://input");
file_put_contents('endpoint.txt',$xml);
}
However I do not get anything after I upload new photo with specific tag? The endpoint.txt
file is empty.Why?
What am I missing?