我们Wishbook有一个B2B移动应用程序(Android和iPhone),我们正在寻求实现文本和照片通信 - 在用户1对1之间,或从用户到他的买家组.我们热衷于能够尽快加快速度,提供良好支持,成熟的库/服务器以及电池友好的东西.
我们现在在Layer,Applozic,QuickBlox和SendBird之间进行比较.谁用过它们?他们使用什么协议(XMPP/MQTT/custom/other)?使用它的经验 - 稳定的代码库等等?此外 - 我们更喜欢开源和口袋友好的产品.
谢谢,Arvind
我正在尝试创建一个带封面照片的群组频道,
this.sendBirdInstance.GroupChannel.createChannelWithUserIds(userIds, true, this.groupName, this.groupPhotoFile, '', function (createdChannel, error) {
...
}
Run Code Online (Sandbox Code Playgroud)
根据文档,我可以添加网址或文件
coverUrl:封面图像的文件或URL,您可以将其渲染到UI中.
但是在添加文件时,我总是得到: "SendBirdException", code: 800110, message: "Invalid arguments."
有没有办法用文件而不是url创建一个组(因为我希望用户上传文件)?
谢谢,
我正在使用RN v0.46.4,react-navigation和sendbird.
我正在开发一个聊天应用程序.
我想要做的是用两个参数导航用户到Msg屏幕item(包含用户信息)和createdChannel.
它们只通过一次,即每次我导航到Msg不同用户的屏幕时,我都会收到我先按下的相同值.
聊天屏幕
_chat(item){
// console.log(item);
const { navigate } = this.props.navigation
var userIds = [item.id,1];
sb = new SendBird({appId: APP_ID});
sb.connect(1, function(user, error) {
//console.log(user);
sb.GroupChannel.createChannelWithUserIds(userIds, true, item.firstname, function(createdChannel, error) {
if (error) {
console.error(error);
return;
}
//console.log(createdChannel);
navigate('Msg', { item, createdChannel })
});
Run Code Online (Sandbox Code Playgroud)
此外,当我createdChannel进入控制台时_chat function,它会按预期提供roght信息.
但是当我在Msg屏幕上控制它时,我只收到创建的第一个createdChannel,已在上面说过.
消息屏幕
super(props);
console.log(props.navigation.state.routes[1].params.createdChannel);
Run Code Online (Sandbox Code Playgroud)
我的路由器结构:
const CustomTabRouter = TabRouter(
{
Chat: {
screen: ChatStack,
path: ""
}
} …Run Code Online (Sandbox Code Playgroud) 我正在使用Sendbird和cordova 构建聊天应用程序,但是它们似乎为除Javascript之外的所有平台提供推送通知的api .他们有针对Android,ios,Unity和.Net + Xamarin的推送通知..因为我是新手,我不确定JS api是不完整还是他们有设计决定没有实现它.
有人可以帮助我获得Sendbird和Cordova的推送通知,我认为FCM是必需的.
我正在关注使用react-native构建聊天应用程序的sendbird教程,当我尝试导入sendbird sdk时出现以下错误:
Unable to resolve module http from .../SendbirdSample/node_modules/sendbird/SendBird.min.js:
Unable to find this module in its module map or any of the node_modules/http and its parent directories
Run Code Online (Sandbox Code Playgroud)
我删除了node_modules文件夹并再次运行npm install,清理了npm cache并清除了watchman watch但无法修复它.
有关这个问题的任何想法?
main.js
import React from 'react';
import {
StyleSheet,
Navigator
} from 'react-native';
var Login = require('./components/login');
var Channels = require('./components/channels');
var ROUTES = {
login: Login,
channels: Channels
};
module.exports = React.createClass({
renderScene: function(route, navigator) {
var Component = ROUTES[route.name];
return <Component route={route} navigator={navigator} />;
},
render: …Run Code Online (Sandbox Code Playgroud) 尝试使用 Guzzle 向 SendBird API 发送请求时收到错误消息。
错误信息
"message": "Client error: `POST https://api.sendbird.com/v3/group_channels` resulted in a `400 BAD REQUEST` response:\n{\"message\":\"Not valid JSON body.\",\"code\":400403,\"error\":true}\n",
"exception": "GuzzleHttp\\Exception\\ClientException",
Run Code Online (Sandbox Code Playgroud)
我的代码
$client = new Client([
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer XXXXX',
'Content-Type' => 'application/json',
],
]);
$response = $client->post('https://api.sendbird.com/v3/group_channels', [
'form_params' => [
'user_ids' => [$user_id_1,$user_id_2],
'operator_ids' => [$user_id_1,$user_id_2]
]
]);
Run Code Online (Sandbox Code Playgroud)