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

Authorizing your bot #6

Closed
moosavimaleki opened this issue Sep 8, 2015 · 4 comments
Closed

Authorizing your bot #6

moosavimaleki opened this issue Sep 8, 2015 · 4 comments

Comments

@moosavimaleki
Copy link

https://core.telegram.org/bots/api#authorizing-your-bot

https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/getMe

'/'
but in telegram.php =>

   // $this->baseURL = self::BASE_URL . $this->token . DIRECTORY_SEPARATOR;

i chang it to :

    $this->baseURL = self::BASE_URL . $this->token . '/';
@mgp25
Copy link
Owner

mgp25 commented Sep 8, 2015

@moosavialeki its the same.

DIRECTORY_SEPARATOR = '/'

It's a predefined constant in PHP

@mgp25 mgp25 closed this as completed Sep 8, 2015
@moosavimaleki
Copy link
Author

why when i run php code trace, and i received error

@mgp25
Copy link
Owner

mgp25 commented Sep 8, 2015

@moosavialeki post script code and response...

@moosavimaleki
Copy link
Author

@mgp25 see umiXmak\getUpdates?offset=0&timeout=60 part


Warning: file_get_contents(https://api.telegram.org/bot83496074:*AEpJ3nK1*****vygkIct1HCe9H-umiXmak\getUpdates?offset=0&timeout=60): failed to open stream: HTTP request failed! HTTP/1.1 502 Bad Gateway in C:\xampp\htdocs\tel\src\Telegram.php on line 386

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1 no such table: contacts' in C:\xampp\htdocs\tel\examples\quoteBot.php:96 Stack trace: #0 C:\xampp\htdocs\tel\examples\quoteBot.php(96): PDO->prepare('SELECT chat_id,...') #1 C:\xampp\htdocs\tel\examples\quoteBot.php(33): allChats() #2 {main} thrown in C:\xampp\htdocs\tel\examples\quoteBot.php on line 96

used xammp in windows

    $this->baseURL = self::BASE_URL . $this->token . DIRECTORY_SEPARATOR;// ERROR
    //$this->baseURL = self::BASE_URL . $this->token . '/'; NO ERROR

mgp25 added a commit that referenced this issue Sep 12, 2015
For windows users
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants