2

I want to add my contact list in Applozic API for chatting in PHP application.

There are no any option to Add New Contact.

Please help me if anyone knows.

Thanks in Advance :)

Naresh Kumar P
  • 4,127
  • 2
  • 16
  • 33
Ronak Selarka
  • 663
  • 1
  • 5
  • 13

1 Answers1

2

Add the following code in onInit for loading contacts:

$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)
                          }
                        ]
         });

Here is a jsfiddle to load contacts in Applozic Chat plugin.

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

For full screen view layout demo, view the source of https://www.applozic.com/docs/chat-examples/web.html

Devashish Mamgain
  • 2,077
  • 1
  • 18
  • 39