如何在PHP中用APPLOZIC列出我的联系人列表(用于网络聊天)?

时间:2016-09-24 11:08:07

标签: php api livechat applozic

我想在 Applozic API中添加我的联系人列表,以便在PHP应用程序中聊天。

添加新联系人没有任何选项。

如果有人知道,请帮帮我。

提前致谢:)

1 个答案:

答案 0 :(得分:2)

在onInit中添加以下代码以加载联系人:

$applozic.fn.applozic('loadContacts', 
                          {"contacts": [{"userId": "USER_1", "displayName": "Devashish",
                          "imageLink": "https://www.applozic.com/resources/images/applozic_icon.png", // image url(optional)
                          "imageData" :"Base64 encoded image data"  // or image data (optional)
                          },
                          {"userId": "USER_2", "displayName": "Adarsh",
                           "imageLink": "https://www.applozic.com/resources/images/applozic_icon.png", // image url(optional)
                           "imageData" :"Base64 encoded image data"  // or image data (optional)
                           },
                          {"userId": "USER_3", "displayName": "Shanki",
                          "imageLink": "https://www.applozic.com/resources/images/applozic_icon.png", // image url(optional)
                          "imageData" :"Base64 encoded image data"  // or image data (optional)
                          }
                        ]
         });

以下是在{Applozic Chat插件中加载联系人的jsfiddle

https://www.applozic.com/docs/web-chat-plugin.html#step-4-populate-contact-list

对于全屏视图布局演示,请查看源代码 https://www.applozic.com/docs/chat-examples/web.html