
內容簡介
這是一個免費的外掛,可使用Expo Api https://expo.io/notifications來發送推播通知。為了使用這個外掛,您需要使用React Native和Expo構建的應用程式。此外掛會創建一個API與原生應用程式進行互動,並存儲用戶的唯一推播令牌,以便從管理面板向他們發送通知。
特點
發送推播通知
為您的應用程式註冊螢幕,並在用戶打開推播通知時將其重定向到特定內容。
跟踪所有發送的通知和註冊到您的應用程式的用戶。
將未完成的推播通知保存為草稿,稍後返回以完成和發送它們。
REST API
Fusion Web App為您註冊了下一個API路線,以連接到您的WordPress站點。
注意:我們強烈建議使用htpps來保護您的網站。
– your_site/wp-json/app/appregister-user-token
類型:POST
操作:它註冊用戶的推播令牌並將信息存儲到數據庫中。
身份驗證:通過提供用戶憑據的基本身份驗證。
響應:[success: true] – 狀態201。否則[success: false,error:error_code] – 狀態201。
參數:
$username:您的WordPress網站中的實際活動用戶。它不需要具有管理員角色,訂閱者就足夠了。
$password:提供的用戶密碼。
$installation_id:Expo安裝ID。使用import Constants from ‘expo-constants’; Constants.installationId。
$name_device:用戶設備的名稱。使用import Constants from ‘expo-constants’; Constants.deviceName。
$platform:僅接受‘ios’或‘android’。使用import { Platform } from ‘react-native’; Platform.OS。
$token:Expo推播通知令牌。有關更多信息,請參閱文檔。
– your_site/wp-json/app/remove-user-token
類型:POST
身份驗證:通過提供用戶憑據的基本身份驗證。
響應:[device_removed: true] – 狀態201。否則[device_removed: false,error:error_code] – 狀態201。
操作:它刪除用戶的推播令牌。當您的用戶從您的應用程式登出並停止發送他們的推播通知時,使用此路線。此外,您可以在應用程式允許用戶在設置中選擇是否接收通知時使用它。
參數:
$username:您的WordPress網站中的實際活動用戶。它不需要具有管理員角色,訂閱者就足夠了。
$password:提供的用戶密碼。
$installation_id:Expo安裝ID。使用import Constants from ‘expo-constants’; Constants.installationId。
$token:Expo推播通知令牌。有關更多信息,請參閱文檔。
– your_site/wp-json/app/get-main-categories
類型:GET
身份驗證:無
響應:數組([‘blogs’ => $blogs,‘audios’ => $audios,‘videos’ => $videos])
操作:使用此路線來提取您網站的主要類別(那些沒有父母的類別)。
參數:無。
外掛標籤
開發者團隊
原文外掛簡介
This is a free plugin to send push notifications using Expo Api https://expo.io/notifications. In order to use this plugin, you need an App built with React Native and Expo. This plugin creates an API to interact with your native App and stores users unique push tokens to eb able to send them notifications from your Admin Panel.
Characteristics
Send push notifications
Register screens for your App and redirect users to specific content when they open notifications.
Keep track of all your notifications sent and the users registered to your App.
Save unfinished push notifications as draft and return later to finish and send them.
Rest API
Fusion Web App registers the next API routes for you to connect to your wordpress site.
Note: We strongly recommend to use htpps in order to protect your site.
– your_site/wp-json/app/appregister-user-token
Type: POST
Action: It registers the user’s push token and stores the information in the database.
Authentication: Basic authentification by providing user credentials.
Response: [success: true] – status 201. Else [success: false, error: error_code] – status 201.
Params:
$username: A real active user in your wordpress site. It does not need to have admin roles, a subscriber is enough.
$password: The password for the user provided.
$installation_id: The Expo installation ID. Use import Constants from ‘expo-constants’; Constants.installationId.
$name_device: The name of the user’s device Use import Constants from ‘expo-constants’; Constants.deviceName.
$platform: only accepts ‘ios’ or ‘android’. Use import { Platform } from ‘react-native’; Platform.OS.
$token: Expo push notification token. For more info on this read the documentation.
– your_site/wp-json/app/remove-user-token
Type: POST
Authentication: Basic authentification by providing user credentials.
Response: [device_removed: true] – status 201. Else [device_removed: false, error: error_code] – status 201.
Action: It removes the user’s push token. Use this route when your users logout from your application and stop sending them push notifications. Also, you can use it in case your app allows users to choose whether to receive or not notifications in the settings.
Params:
$username: A real active user in your wordpress site. It does not need to have admin roles, a subscriber is enough.
$password: The password for the user provided.
$installation_id: The Expo installation ID. Use import Constants from ‘expo-constants’; Constants.installationId.
$token: Expo push notification token. For more info on this read the documentation.
– your_site/wp-json/app/get-main-categories
Type: GET
Authentication: None
Response: Array([‘blogs’ => $blogs, ‘audios’ => $audios, ‘videos’ => $videos ])
Action: Use this route to fetch the main categories (those without parents) of your website.
Params: None.
