venomous0x / WhatsAPI

Interface to WhatsApp Messenger
2.59k stars 2.13k forks source link

BUG : sendSetProfilePicture #743

Open blackhackereg opened 10 years ago

blackhackereg commented 10 years ago

i am trying to change my profile picture but no result this is my code

$w = new WhatsProt($userPhone, $userIdentity, $name, true); $w->Connect(); $w->LoginWithPassword($password); $w->sendSetProfilePicture("demo/Whatsapp.jpg");

any idea !!

jesussales commented 10 years ago

Try with a relative direction of image, not absolute...

Saludos Jesús Sales

El 25/05/2014, a las 18:07, blackhackereg notifications@github.com escribió:

i am trying to change my profile picture but no result this is my code

$w = new WhatsProt($userPhone, $userIdentity, $name, true); $w->Connect(); $w->LoginWithPassword($password); $w->sendSetProfilePicture("http://www.expresswapp.net/Whatsapp.jpg");

any idea !!

— Reply to this email directly or view it on GitHub.

blackhackereg commented 10 years ago

i tried with both :(

mgp25 commented 10 years ago

@blackhackereg Well, try this:

$path= /path/toYourImage.jpg; // here you can setup the path where the image is located.

if ($_SERVER['argv'][1] == "-photo") {
    $path = $_SERVER['argv'][3];
    echo "\n[] Cambiando foto de perfil...\n";
    $wa->sendSetProfilePicture($path);
    exit(0);
}

This is part of a console script in php, i recommend you to place your photo in the same folder as the script you are running. For example:

MyFolder:

So in the path you only need to set as $path = "myImage.jpg";

Tonight i will post a script for you in case it still not working for you ;)

blackhackereg commented 10 years ago

not work for me :(

mgp25 commented 10 years ago

@blackhackereg Did you try exampleFunctional.php? It should replace your actual profile picture by x3.jpg that is placed in the demo folder.

It works to me

jesussales commented 10 years ago

Today I change my picture and status ok... Try with exampleFunctional.php mode

Saludos Jesús Sales

El 28/05/2014, a las 22:06, mgp25 notifications@github.com escribió:

@blackhackereg Did you try exampleFunctional.php? It should replace your actual profile picture by x3.jpg that is placed in the folder demo.

It works to me

— Reply to this email directly or view it on GitHub.

Marcorele commented 10 years ago

Somene know how sendSetProfilePicture method works with Yowsup?

mgp25 commented 10 years ago

@Marcorele is better to you to ask in yowsup repo. I see you already asked there.

Here is the documentation Yowsup Library Documentation you have everything there :)

Marcorele commented 10 years ago

Ok thank you, but something is wrong on the library, cause the method invoking don't work with profile_setPicture(str filePath)

mgp25 commented 10 years ago

@Marcorele i answered you in the yowsup repo, i dont python as well as php. So if you want more support you could try with WhatsAPI.