{"action":"created","issue":{"url":"https://api.github.com/repos/zelenin/telegram-bot-api/issues/22","repository_url":"https://api.github.com/repos/zelenin/telegram-bot-api","labels_url":"https://api.github.com/repos/zelenin/telegram-bot-api/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/zelenin/telegram-bot-api/issues/22/comments","events_url":"https://api.github.com/repos/zelenin/telegram-bot-api/issues/22/events","html_url":"https://github.com/zelenin/telegram-bot-api/issues/22","id":197383921,"number":22,"title":"How I can use a webhook method?","user":{"login":"nikosid","id":1609434,"avatar_url":"https://avatars.githubusercontent.com/u/1609434?v=3","gravatar_id":"","url":"https://api.github.com/users/nikosid","html_url":"https://github.com/nikosid","followers_url":"https://api.github.com/users/nikosid/followers","following_url":"https://api.github.com/users/nikosid/following{/other_user}","gists_url":"https://api.github.com/users/nikosid/gists{/gist_id}","starred_url":"https://api.github.com/users/nikosid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikosid/subscriptions","organizations_url":"https://api.github.com/users/nikosid/orgs","repos_url":"https://api.github.com/users/nikosid/repos","events_url":"https://api.github.com/users/nikosid/events{/privacy}","received_events_url":"https://api.github.com/users/nikosid/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-23T15:08:20Z","updated_at":"2016-12-23T15:45:49Z","closed_at":"2016-12-23T15:13:44Z","body":"Hello.\r\nI want to use my bot with webhook method not with getUpdates.\r\nIt works very good with your deamon approach.\r\nAlso it works with this component and its method https://github.com/unreal4u/telegram-api/wiki/Getting-updates-via-Webhook\r\nI tried do somethimg like this\r\n```\r\nuse Zelenin\\Telegram\\Bot\\Type\\Update;\r\n\r\n$update = new Update($_POST);\r\n```\r\nbut it doesn't work.\r\nI got an error:\r\n\r\n> TypeError: Argument 1 passed to Zelenin\\Telegram\\Bot\\Type\\Type::create() must be an instance of stdClass, array given, called in /var/www/telegram/vendor/zelenin/telegram-bot-api/Type/Update.php on line 60 and defined in /var/www/telegram/vendor/zelenin/telegram-bot-api/Type/Type.php:51"},"comment":{"url":"https://api.github.com/repos/zelenin/telegram-bot-api/issues/comments/269007807","html_url":"https://github.com/zelenin/telegram-bot-api/issues/22#issuecomment-269007807","issue_url":"https://api.github.com/repos/zelenin/telegram-bot-api/issues/22","id":269007807,"user":{"login":"zelenin","id":1427885,"avatar_url":"https://avatars.githubusercontent.com/u/1427885?v=3","gravatar_id":"","url":"https://api.github.com/users/zelenin","html_url":"https://github.com/zelenin","followers_url":"https://api.github.com/users/zelenin/followers","following_url":"https://api.github.com/users/zelenin/following{/other_user}","gists_url":"https://api.github.com/users/zelenin/gists{/gist_id}","starred_url":"https://api.github.com/users/zelenin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zelenin/subscriptions","organizations_url":"https://api.github.com/users/zelenin/orgs","repos_url":"https://api.github.com/users/zelenin/repos","events_url":"https://api.github.com/users/zelenin/events{/privacy}","received_events_url":"https://api.github.com/users/zelenin/received_events","type":"User","site_admin":false},"created_at":"2016-12-23T15:45:49Z","updated_at":"2016-12-23T15:45:49Z","body":"try this:\r\n```$response = new \\Zelenin\\Telegram\\Bot\\Client\\Response(true, json_decode(file_get_contents('php://input')));\r\n$update = Update::createFromResponse($response);```"}}
{"actor":{"display_login":"zelenin"}}