Find the hub url. There should be a (or atom:link) element in the feed with rel="hub". The href contains the url of the hub. There are many different hubs out there!
Implement a callback url. This url (which must be accessible from outside (so, not localhost!) will be called by the hub when new content is available for you. It should also implement the verification mechanism (see below)
Perform the subscription request to the hub : it's a POST request to the hub url (see 1.) with the following params : hub.topic= hub.callback= hub.mode=subscribe hub.verify=sync (keep sync, as it's easier to debug).
The hub will send a verification request to your callback, with a hub.verify_token param. Your app must then echo this param for the subscription to be validated.
If all is fine, the hub will return 204 and you're good to go. If not, it will return a 4XX and you should check the body as it includes indications of what failed.
Later, once the subscriptions is acknowledged, you will get POST requests with the content of the update in the body.
Here is the process :
Find the hub url. There should be a (or atom:link) element in the feed with rel="hub". The href contains the url of the hub. There are many different hubs out there!
Implement a callback url. This url (which must be accessible from outside (so, not localhost!) will be called by the hub when new content is available for you. It should also implement the verification mechanism (see below)
Perform the subscription request to the hub : it's a POST request to the hub url (see 1.) with the following params : hub.topic= hub.callback= hub.mode=subscribe hub.verify=sync (keep sync, as it's easier to debug).
The hub will send a verification request to your callback, with a hub.verify_token param. Your app must then echo this param for the subscription to be validated.
If all is fine, the hub will return 204 and you're good to go. If not, it will return a 4XX and you should check the body as it includes indications of what failed.
Later, once the subscriptions is acknowledged, you will get POST requests with the content of the update in the body.