Fetch latest posts from social media via dialogflow - web-scraping

Is it possible to fetch latest posts from Facebook and Twitter and youtube via dilaogflow when somebody asks "what's new?"

It is certainly possible in theory.
You can do it by make an intent which will be triggered with phrases like "what's new", and then you will have to enable webhook for that intent where you will write your code to fetch latest posts from Facebook etc.
But it won't be practical because in DialogFlow there is a time limit of 5 seconds within which your webhook should respond to the user otherwise there will be time-out exception. And I don't think 5 seconds are enough to fetch the latest posts.

Related

How to build in app notification service?

I'm learning backend and API development and trying to understand how to implement some features from scratch without using any paid third party service.
I want to understand this concept from design as well as implementation pov. Please share if you have any resources where I can learn how to code the below service.
How to build in app notification service like one of these from scratch ?
Notification when user likes or comments on a post (Instagram, Twitter)
Notification when someone views your profile (Linkedin)
Notication when a channel you are subscribed to uploads a video (Youtube)
These are different from push notifications like
Notification when someone sends you a message (All chat apps)
Live status via notification of your delivery (Food delivery apps)
Push notifications need not be stored permanently in any database but what happens with in app notifications? How to build such service which is scalable too.
One possible solution I could think of is this, for notification on post like
User A has made a post.
User B likes their post.
From likePost API emit an event which will notify User A that User B liked their post, listen for these real time events on client side. This can be done via sockets.
Do not store any notifications in database, just update the notifications in UI on that event emitted by likePost API or listen to real time changes in likes attribute of a User's Post table (is this possible?) and update UI.
In UI just show all such notifications by fetching from likes and comments table.
But I wonder how scalable is this approach.
I searched but couldn't find any good resources regarding this, so please if anyone could explain this or provide link to any blog or videos it will be helpful.
(P.s. I'm an undergrad student and don't have experience in system design and architectures, just started learning about these so just curious)
Thanks.
apps like Facebook, Instagram and linkedIn provides web hook of notifications. Webhooks allow you to receive real-time HTTP notifications for subscribed events. This functionality is only available for applications with an approved use case for webhooks. Webhhook received as a notification when user comment on your post or like your post, a web hook can be used to retrieve the information of post, comment and commentor etc.
I am attaching a reference of LinkedIn web-hook.
https://learn.microsoft.com/en-us/linkedin/shared/api-guide/webhook-validation

How to combine notifications Flutter FirebaseMessaging

Hi I was wondering if there is a way in which I could use Firestore messaging and flutter to merge notifications such similar to how instagram does it. Where initially it will say a single person liked a post e.t.c then if more like the post it will merge it by saying bob, garry and 42 others liked a post. I have an image below which I hope makes the objective more clear
Those are so-called collapsible messages. From the Firebase documentation:
A collapsible message is a message that may be replaced by a new message if it has yet to be delivered to the device.
A common use cases of collapsible messages are messages used to tell a mobile app to sync data from the server. An example would be a sports app that updates users with the latest score. Only the most recent message is relevant.
So in the example of Instagram messages, when somebody likes the same post, the server sends a new message that replaces the previous message, by specifying the same collapse_key.

Youtube API - is there a way to get real-time information about youtube channels like new video being uploaded?

I am trying to build an application that does something every time a new video is uploaded to one or more channels.
My search lead me to the Youtube Data API V3. This is a push notification service that sends information every time a channel that you are subscribed to makes one of the following changes:
1. new video upload, 2. change in title, and 3. change in the video description.
I implemented this in python and I subscribed to receive updates on my channel. I was able to see that the subscription was successful using the pubshub/ websub tool . However, when changes were made to the videos on the channel I was subscribed to, I did not receive any push notifications.
some said that there's a huge delay ( it should not be because youtube claims it's near real-time), but then I saw the issue tracker page for this feature which basically says that the feature is broken.
So, I wanted to know if there is any other mechanism that I can try to do this? or is there someone who has tried this, and it's working?

Push Notification from API Update?

I am working with the soundcloud API and I want to send a user a push Notification on iOS whenever a targeted user uploads a new track. The app is developed with the Ionic Framework/ Cordova. I've looked into Amazon SNS and Parse but I can't find a way to watch the array. I can also do this through a RSS feed if that is easier.
Thanks
RSS is probably a pretty good way to detect new episodes/sounds posted. Hopefully, Soundcloud will implement PubSubHubbub, or you'll have to fetch/parse the feeds yourself.
Once you've identified the new entries, you can then sent the notifications.

Tickera WordPress Plugin, getting a PayPal IPN error e-mail

I purchased the Tickera wordpress plugin from Tickera.com. I have repeatedly requested support from them, but they don't respond.
I installed this plugin on a client's website to sell tickets for an event. The plugin works. The visitor buys the ticket via paypal and then they are sent an e-mail with a PDF attachment of the ticket which can be scanned at the event.
The problem is that with each transaction, my client gets an e-mail from PayPal with this statement:
Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing:
and then it has my client's URL with the folder where the WordPress lives and then ?ipn=paypal.
Do I need to open a IPN account on PayPal to stop the error e-mail? I have been afraid to do this, in case it screws up the function of the plugin. It is working now.
Does anyone have experience with this?
-w
It sounds like the plugin must be setting the IPN URL using the NotifyURL parameter of API requests, or just the notify parameter in a standard HTML button/form. That would override anything you set up in your PayPal profile anyway.
It sounds like there must be some sort of a problem with the IPN script itself that is causing it to send a failure code of some sort back to PayPal's IPN server. You should be able to check your web server logs for the times that URL is getting hit and see the result there so you can look at the error and resolve it.
I would be very reluctant using this plugin - see Facebook for more than enough reasons. As to not try to say too much, I will just say "client side only validation" and "tickera == name your own price ticket system". What made this bug even worse is that it could be triggered accidentally by merely using normal browser behavior and so a kid with no knowledge of Javascript or the sort could still easily add 4 tickets, proceed to payment, click back in the browser and again proceed and get 4 tickets for the price of 1... Someone with a bit more knowledge and malicious intent could mess with a client side value array and set prices to $0.01/ea if they wished... I was consulting for someone in an attempt to clean up the mess from using this plugin and quickly discovered Tickera to be less than helpful on the support front... Best I can tell, the client-only-validation "bug" (horrible design) is still in play.. When notified of the bug, they were pretty much like "Oh, no biggie - just review all sales and cancel/refund/etc manually" - an unacceptable solution for medium/large events and just bad business for an event of any size... There are some serious security concerns with this plugin and their lack of response or support is just the icing on the cake... Beware.

Resources