how to push notification to mobile devices in laravel using FCM - laravel-5.5

laravel package to push notification
click here to see output
click here to see code

Related

How to use fcm-django?

I'm just new in django-fcm. Can anyone give a step by step how to setup django-fcm package ? I want to push notification to web browser, when user allow notification from my website.
Thank You

Facebook API page feed didn't send information to my webhook?

I'm admin of my test app, and my test page.
Now I'm doing a function get page's feed realtime by webhook, just only on development mode.
When I click test button on App's Dashboard, It has been sent to my webhook. But when I comment or like ... the post, facebook doesn't send even though I subscribed feed webhook.
With Messages, it has been sent successfully, but Feed doesn't.
I ask facebook support, so they said that:
"Applications will only be able to receive test webhooks sent from the
app dashboard while they are in development. No production data,
including that of app admins, developers, and testers, will be
delivered unless the app is live. In order to receive feed webhooks,
your app needs to be live and has to go through app review for
necessary permissions."
I understand that I can not get data from facebook even though it is under development mode.
So how can I get data returned by facebook to develop, test... apps in development mode.
Thanks so much.
It is not possible to run this service without an app review, since it is not possible to add the 'mange_pages' permission to a (test-)user within a development app. At the same time it is not possible to turn a testapp into live-mode. As the same is true vice versa the only solution is the app review to get information from a specific (test-)page.
For live testing i suggest to create a testuser and subscribe for information about the "user" to test your webhook.
You can check with GET graph.facebook.com/app-id/subscriptions, if your app is successfully subscribed to "page information". Graph API Documentation
As you already mentioned you can also send "page information" test calls to your endpoint.
UPDATE 18th Nov 2018
If you go to Webhook -> pages in your App Dashboard on https://developers.facebook.com you are able to notice, that Webhooks in dev mode do not work.
I've submitted a Bug report to Facebook for this issue, as there is no proper solution.
You can check it at : https://developers.facebook.com/support/bugs/1570460936387604/
I also don't get the fact that you can't test webhooks in dev mode, and you can't do the app review because you can't develop your app and show them for review.
Just a chicken and egg issue.

Receive OneSignal background notification in Ionic 2 app

I am using OneSignal push notifications in my Ionic 2 app. It works fine except for the following case:
Kill the app to make sure it is not running in the background.
Send a notification to the app.
Dismiss the notification.
Open the app.
I don't receive any indication that the notification was received.
I have called OneSignal.handleNotificationReceived().subscribe(), during initialisation, but this is not triggered unless the app is running in the foreground/background.
Is there any way to get the notification when the app is started, even if the user dismissed the notification.
Thanks.
There is no way to achieve what you're trying to achieve through the use of OneSignal alone. The OneSignal plugin for Ionic 2 has two calls to action:
handleNotificationReceived() & handleNotificationOpened()
The first one is called when the notification is received and the app is in the foreground, and the second is called when the app is launched from the notification.
You'd need some other service to record when notifications are sent to see if there were any when the app was launched by itself. If you use OneSignal's REST API to send notifications yourself, you can record when a notification is sent, and then when the app is launched by itself, and not from the notification, you can fetch missed notifications or notification count from your own server. That's just one way you can do it.
But ultimately OneSignal is a push notification service, and that's all it does, send notifications. Even if you did APNS or FCM yourself and went through the scenario you outlined, the results would be the same, it's not a OneSignal issue. It's the way notifications are designed.

How to open my iOS app from Facebook Messenger?

I am building one of the FB Messenger Bot applications and i want to send my apps customer URL into messenger so that user can tap on it to open the app (The app is already installed on the device). This is app is not in the app store and just a demo for now.
How can i achieve this ? When i am sending customeURL:// as text back to messenger it identifies it as bad URL.
Thanks,
Have you tried adding some text before and after your URL?

Push notification to IOs or Android from django webapp

I have my Django Web app and I want to make a mobile version but it will take me a while, so, I would like to know if it is possible to send push notifications to the mobile phone (either Android, Apple) from the webapp.
The client will run the website normally from the phone and I would like to send a notification when the process made is finished. How can I achieve that ? Do django signals have the effect of push notification ?
Thanks
You can connect QuickBlox to your app and that would be a way to go.
Here's the tutorial for iOS: http://quickblox.com/developers/SimpleSample-messages_users-ios
And this one is for Android: http://quickblox.com/developers/SimpleSample-messages_users-android
Hope that helps.