Skip to content
This repository has been archived by the owner on Dec 30, 2020. It is now read-only.

is there any plan to provide invite function? #185

Closed
rajenpal033 opened this issue Oct 8, 2016 · 7 comments
Closed

is there any plan to provide invite function? #185

rajenpal033 opened this issue Oct 8, 2016 · 7 comments

Comments

@rajenpal033
Copy link

Hello @seregazhuk ,

I am using this for a while and really liked it!
I noticed that there is currently no options to invite people, will there be any chance to get it in near future?

Thanks.

@seregazhuk
Copy link
Owner

Hi, @rajenpal033
Yes, the next release will come with the ability to reset passwords and invitations by email. I think it will be done on Monday.

@rajenpal033
Copy link
Author

Thanks for your information, but it seems to be many functions for pins, boards, pinners, search etc. not working getting blank response. is there any reason?
Thanks.

@seregazhuk
Copy link
Owner

Can you give an example, what functions don't work?

@rajenpal033
Copy link
Author

rajenpal033 commented Oct 8, 2016

$bot->pins->info(pintId);
$bot->pins->search('wedding'); (this was working few hours ago)
$bot->pins->comment(pintId, 'nice one!');
and almost other functions from pins, boards as in like, repin etc. and the strange this is even the search is not working. But it's not like all are's working, some like user->profile, boards->forUser these are working fine. I just modified one of your file to save and fetch cookie, in CurlHttpClient.php file as following:

protected function initCookieFile($username){
$mainDir = dirname(FILE).DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.$username;
if(!is_dir($mainDir)){
mkdir($mainDir, 0755);
}
if(empty($username)) {
return tempnam($mainDir, self::COOKIE_PREFIX);
}
$cookieName = self::COOKIE_PREFIX . $username;
$cookieFilePath = $mainDir . DIRECTORY_SEPARATOR . $cookieName;
if (!file_exists($cookieFilePath)) {
touch($cookieFilePath);
}
return $cookieFilePath;
}

Let me know.
Thanks in advance.

@seregazhuk
Copy link
Owner

  1. If you use FILE, there is no such constant in php, try to use FILE
  2. If out have your own FILE constant, I think your $mainDir doesn't have permissions and bot can't save cookie files.

@seregazhuk
Copy link
Owner

update to the latest release (4.13.0) and you can send invites like this:

$bot->user->invite($email);

To change cookies storage path you can use this method:

$bot->getHttpClient()->setCookiesPath($customPath);

@rajenpal033
Copy link
Author

Thanks @seregazhuk

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

No branches or pull requests

2 participants