Pubsubhubbub doesn't send push notification any more - youtube

In order to get notified whenever a channel has a new video I have implemented the Pubsubhubbub protocol as suggested here: https://developers.google.com/youtube/v3/guides/push_notifications
The server I have for the callbackUrl is a Node.js application and I use the "pubsubhubbub" package to bootstrap the creation and handling of any events.
But for whatever reason, the server doesn't receive any more requests. I've tried resubscribing to the YouTube channels but to no luck. Is there an expiration date after which all subscriptions are dropped so that I need to re-subscribe regularly?
Any help would be very much appreciated.

Short answer, YES. Unfortunately, You need to resubscribe again and again.
As I was looking for the same answer actually, after searching a bit, I found out finally that the subscription has an expiry date. See the "Subscriber Diagnostics" section for details (screenshot from "Subscriber Diagnostics" of my subscription)

Related

iOS push notifications with Firebase FCM to a specific user

I am trying to send notifications to users when something happens in their account, for example a new friend request or follower, or a tag in an image. I have been looking into Firebase FCM to make this happen but can't figure out how to send push notifications to just 1 user, based on some activity in their account.
Is there any way this can be done in FCM or are there are any other methods out there to make this happen? I'm new to iOS dev and push notifications, so any help will be greatly appreciated!
Thanks!
PS: If I do need to make my own server for this, could someone point me to any resources to do this in python? I've seen quite a few posts for APNs servers in PHP, but I don't know PHP that well.
The easiest way is to use Firebase Cloud Functions , I have experience working with it using Javascript then trigger the function when something changes in database. You can also send a http request with the specific device token which you want a push notification to be delivered to, then the function will do it's magic for you. Firebase have ready to use samples from their Github repo.
NB: - For your case if you really want to use Python then check this answer it might help you get started.

google calendar api - change web_hook address for an existing push notification channel

Our site has a calendar sync feature with google calendar using google calendar api, and their push notifications service. so far so good, users are happy with the feature. and we're happy they're happy:)
Recently we decided to add a sub domain to the server handling google notifications (for none related reasons)
so it is changing from http://example.com to http://api.example.com.
THE PROBLEM we cant find a way to replace the domain address for the existing users channels.
Any Suggestions?
Thanks.
PS - i'm aware of the security issue, after all the users authorized http://example.com and not http://api.example.com. but still we need to free http://example.com for other matters.
You are going to have to stop the original one and start a new one. I dont think there is anyway to updated it. Its actually documented that its not possible to renew them so that would make me think its not possible to update them at all Renewing notification channels.

What can be the reason of “Unable to find subscription with identifier” in Rails ActionCable?

We have the iOS Application in which we are using the action cable to give me fast response as user like something or comment on any post. Few days back everything is working fine. But from last few days action cable is not working. And my iOS application is live on the App Store. When ever my back end developer broadcast from her side. I will not get the response. When I hit the action cable multiple times. Then I get the single response out of 4 of them.
Now if any body help me what can I do right now.
What can be the reason of “Unable to find subscription with identifier” in Rails ActionCable?
[![> Unable to find subscription with identifier:
{"channel":"CommonChannel","auth_token":"zoRGfSZhS3mH6UxENVcJ"}]]1]1
We have a single channel in which we have multiple actions because I cannot subscribe the channel every time and then hit any function it makes me irritate to do every time subscribe the channel and then call the function.
Does any body has the solution for this issue. We have tried the wait loop as well after subscribing any channel.
Please anybody help me.
Thanks in advance.
Might be a race condition, see other question: What can be the reason of "Unable to find subscription with identifier" in Rails ActionCable?
In rails the issue (https://github.com/rails/rails/issues/25381) was supposed to be fixed, but maybe you found another way to trigger it.
Try to add some wait between the initial hello request and the subscription. If you are using graphql subscriptions, try to add a sleep between the actioncable subscription and the graphql subscription

iOS schedule and notifications

I want to make an iOS app that checks a database every day on 10:00 AM. And if there is a new post, send a push notification, like whatsapp and facebook. I searched on Google for this but did not find anything that could help me.
Can anyone give me some information or a good tutorial about this?
Your approach is wrong. This should all be controlled by a server. The server should run a job at the designated time each day which checks for (unread) content and sends a push notification. The app is just there to receive the push notification and display the results.
You need to learn about Local & Push Notifications. Yes, Apple documentation is very rich.
This is a cool short video on how to implement it in Xcode 5.
AppCoda also has a blog post on it.

Best way to show the recent post - Objective C

I have an iOS app which is installed in two different device but logged in with same account. If I do a new post from a device it should be shown instantly in the other devices. Currently I am refreshing the posts feed for every 10 seconds interval. Is this is a optimal way or is there any other better solution for this.
As #wattson12 was saying push notification are designed for that.
I would recommend using an API for that : Urban Air Ship
What you do is called polling. It’s the simplest solution, but it’s not optimal, because it requires you to query the server constantly and still there’s delay before you know about the new posts.
One way to know about new posts is to keep an HTTP connection open, waiting for the server to notify you about new posts (see Wikipedia for details, also related question here). Other option is push notifications: the server can post a notification when new content arrives. I’m not sure which one is technically more simple.

Resources