{"action":"created","issue":{"url":"https://api.github.com/repos/dodgepudding/wechat-php-sdk/issues/280","labels_url":"https://api.github.com/repos/dodgepudding/wechat-php-sdk/issues/280/labels{/name}","comments_url":"https://api.github.com/repos/dodgepudding/wechat-php-sdk/issues/280/comments","events_url":"https://api.github.com/repos/dodgepudding/wechat-php-sdk/issues/280/events","html_url":"https://github.com/dodgepudding/wechat-php-sdk/issues/280","id":126111111,"number":280,"title":"不能获取用户取消关注事件","user":{"login":"trock","id":3960642,"avatar_url":"https://avatars.githubusercontent.com/u/3960642?v=3","gravatar_id":"","url":"https://api.github.com/users/trock","html_url":"https://github.com/trock","followers_url":"https://api.github.com/users/trock/followers","following_url":"https://api.github.com/users/trock/following{/other_user}","gists_url":"https://api.github.com/users/trock/gists{/gist_id}","starred_url":"https://api.github.com/users/trock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trock/subscriptions","organizations_url":"https://api.github.com/users/trock/orgs","repos_url":"https://api.github.com/users/trock/repos","events_url":"https://api.github.com/users/trock/events{/privacy}","received_events_url":"https://api.github.com/users/trock/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-12T06:47:05Z","updated_at":"2016-01-15T03:41:21Z","closed_at":null,"body":"其它事件都是正常的，不知道是不是还有什么要注意的。\r\n\r\n代码片段如下：\r\n$event = $this->wx->getRev()->getRevEvent();\r\nswitch ($event['event']) {\r\ncase TPWechat::EVENT_SUBSCRIBE:\r\n     $this->weObj->text(\"关注了哦\")->reply();\r\n     break;\r\n //取消关注\r\ncase TPWechat::EVENT_UNSUBSCRIBE:\r\n F('Wechat/Event_unsubscribe'.time(),'123456789');\r\n break;\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dodgepudding/wechat-php-sdk/issues/comments/171864764","html_url":"https://github.com/dodgepudding/wechat-php-sdk/issues/280#issuecomment-171864764","issue_url":"https://api.github.com/repos/dodgepudding/wechat-php-sdk/issues/280","id":171864764,"user":{"login":"nfer","id":1737782,"avatar_url":"https://avatars.githubusercontent.com/u/1737782?v=3","gravatar_id":"","url":"https://api.github.com/users/nfer","html_url":"https://github.com/nfer","followers_url":"https://api.github.com/users/nfer/followers","following_url":"https://api.github.com/users/nfer/following{/other_user}","gists_url":"https://api.github.com/users/nfer/gists{/gist_id}","starred_url":"https://api.github.com/users/nfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfer/subscriptions","organizations_url":"https://api.github.com/users/nfer/orgs","repos_url":"https://api.github.com/users/nfer/repos","events_url":"https://api.github.com/users/nfer/events{/privacy}","received_events_url":"https://api.github.com/users/nfer/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T03:41:21Z","updated_at":"2016-01-15T03:41:21Z","body":"可以使用下述的方式写入Log，来确认是没有收到消息，还是其它地方处理的有问题：\r\n```\r\nfunction logg($text) {\r\n    file_put_contents('./data/log.txt',$text.\"\\n\", FILE_APPEND);\r\n}\r\n\r\n$options = array(\r\n\t\t'token'=>'xxxxxxxxxxx',\r\n\t\t'encodingaeskey'=>'xxxxxxxxxxx',\r\n\t\t'appid'=>'xxxxxxxxxxx',\r\n\t\t'appsecret'=>'xxxxxxxxxxx',\r\n\t\t'debug'=>true,\r\n\t\t'logcallback' => 'logg'\r\n\t);\r\n$weObj = new Wechat($options);\r\n```\r\n\r\n注意，需要提前创建./data/log.txt，并修改响应的读写权限"}}