Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doubt about Contact Synchronization #762

Open
RodrigoRVieira opened this issue Jun 5, 2014 · 18 comments
Open

Doubt about Contact Synchronization #762

RodrigoRVieira opened this issue Jun 5, 2014 · 18 comments
Labels

Comments

@RodrigoRVieira
Copy link

Hi everyone!

Anyone know if I need to call the method with all my contacts every single time or it can be called incrementally?

Thank you

@shirioko
Copy link
Contributor

shirioko commented Jun 5, 2014

You can use mode="delta" and send them incrementally. If you use it too often it will return an error node with a "backoff" time.

@RodrigoRVieira
Copy link
Author

Got it! Thank you

Two more questions... what exactly this synchronization process does? What triggers synchronization in the official client?

@shirioko
Copy link
Contributor

shirioko commented Jun 5, 2014

From what I understand:

  • mode="full"&context="registration": runs after registration (duh)
  • mode="full"&context="background": scheduled nightly sync
  • mode="delta"&context="background": triggered by adding a contact with phone number to the phone

I still owe you a complete answer for this, I'll check out the sources I have when I get home.

@RodrigoRVieira
Copy link
Author

Thank you

@faisalcse
Copy link

Contact Synch not working

@mgp25
Copy link
Contributor

mgp25 commented Jun 11, 2014

@faisalcse Its working perfectly, post output/script or error description

@faisalcse
Copy link

I am not getting any error. It keeps waiting and waiting but nothing come result.

@Marcorele
Copy link

@faisalcse You have reach the limit...

@faisalcse
Copy link

what limit?

@Marcorele
Copy link

You can't sync unlimited contacts with same username and password.

When you reach the limit, it keeps waiting without any result...

@faisalcse
Copy link

OK. what is the maximum # number of contacts I can synchronize with same username and password?
Another question, is there any days limit like with 24 hours I can synchronize maximum # number of contacts?

@mgp25
Copy link
Contributor

mgp25 commented Jun 22, 2014

@shirioko as @McBacker asked, what exactly this synchronization process does? What triggers synchronization in the official client?

thanks

@CodersBrothers
Copy link
Contributor

What is and make $index = 0, $last = true in

 public function sendSync(array $numbers, $mode = "full", $context = "registration", $index = 0, $last = true)

@mpbanna
Copy link

mpbanna commented Sep 6, 2014

Hi everyone,
i have found a new problem that sendSync method allows only one synchronize per hour, means backoff time is set 60 minute after one try of sendSync method .
And i have also tried with all 3 arguments that are

mode="full"&context="registration"
mode="full"&context="background"
mode="delta"&context="background"

but it allow only one time per hour , and i surprised that i changed mode="abc"&context="abc" , than it also allow me synchronize one time per hour.

please help me
Thanks

@mgp25
Copy link
Contributor

mgp25 commented Sep 6, 2014

The backoff time is something server side, it wont allow you to sendSync multiple times. No fix.

@mpbanna
Copy link

mpbanna commented Sep 8, 2014

But according to @shirioko, context="background" allows 4 times per hour and context="registration" allows 50 times per hour ,than what does it mean and according to @mgp25 ,before sending each message we have to use sendSync method to stop blocking ,than how it is possible if sendSync not allows multiple time ???

please give me proper solution to this problem.

@mgp25
Copy link
Contributor

mgp25 commented Sep 8, 2014

sendSync is just a function to import your contacts from Adress Book (contact list) to WhatsApp contact list. So only the ones who has WhatsApp appear in your WhatsApp contact list. You should sendSync only at the start of the App or when adding a new contact. There isnt required to sendSync multiple times, just makes no sense. Also sometimes when you have WhatsApp running at background it sendSync to check if is there any contact to add to WhatsApp contact list.

If you send messages to random / semi random users or just send messages (spam) you will be blocked and there is no way to avoid that. It's easy.

@ankurextreme
Copy link

please explain a bit.
while using sendSync(array (a,b)) say contacts a &b , so does it mean only a,b contacts are in address book ?
if we do next time sendSync(array (c,d)) does it mean contact a & b is deleted from my phone?
is it possible to get all contacts with are LINKED to my account ? or is it that only the contacts i sync are every time only that are linked, in this case only c,d and not a,b ?

i have a small site which sends welcome message on customer registration.
so when a new customer arrives, do i have to sync only his contact or ALL the contact to which i sent message before ?
after sync wen i call onSyncResult($result) like in example in your repo if it exist then i send a message.

what is the best solution to my problem ?
site flow required for = registration -> check if available on whatsapp by sync(this particular number ) -> if onSyncResult($result) and $result->existing then send a welcome message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants