{"action":"created","issue":{"url":"https://api.github.com/repos/MaloRchrd/clope-bot/issues/1","repository_url":"https://api.github.com/repos/MaloRchrd/clope-bot","labels_url":"https://api.github.com/repos/MaloRchrd/clope-bot/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/MaloRchrd/clope-bot/issues/1/comments","events_url":"https://api.github.com/repos/MaloRchrd/clope-bot/issues/1/events","html_url":"https://github.com/MaloRchrd/clope-bot/issues/1","id":187044734,"number":1,"title":"Récupérer la latitude et longitude du payload. ","user":{"login":"MaloRchrd","id":17042850,"avatar_url":"https://avatars.githubusercontent.com/u/17042850?v=3","gravatar_id":"","url":"https://api.github.com/users/MaloRchrd","html_url":"https://github.com/MaloRchrd","followers_url":"https://api.github.com/users/MaloRchrd/followers","following_url":"https://api.github.com/users/MaloRchrd/following{/other_user}","gists_url":"https://api.github.com/users/MaloRchrd/gists{/gist_id}","starred_url":"https://api.github.com/users/MaloRchrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaloRchrd/subscriptions","organizations_url":"https://api.github.com/users/MaloRchrd/orgs","repos_url":"https://api.github.com/users/MaloRchrd/repos","events_url":"https://api.github.com/users/MaloRchrd/events{/privacy}","received_events_url":"https://api.github.com/users/MaloRchrd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":24,"created_at":"2016-11-03T12:20:39Z","updated_at":"2016-11-08T11:07:05Z","closed_at":null,"body":"Hello @thaume \r\n\r\n\r\n\r\nMon probleme est simple je n'arrive as a recevoir les informations du payload envoyé par messenger lors d'un réponse géolocalisé \r\n\r\nje t'ai mis en testeur ou developper sur le bot tu peux le voir [ici](https://www.facebook.com/Tabac-ouvert-960621237397515/)\r\n\r\n![img_2599](https://cloud.githubusercontent.com/assets/17042850/19965279/8d4a4b28-a1c6-11e6-8adb-ea6d2df5336e.PNG)\r\n![img_2600](https://cloud.githubusercontent.com/assets/17042850/19965282/8fa805f4-a1c6-11e6-9d85-1b688003dc2d.PNG)\r\n\r\nJ'ai testé different exemple mais sans grande réussite je metterai des liens inspirations etc en dessous. \r\n\r\n\r\nJ'ai trouvé ça sur [stack](http://stackoverflow.com/questions/37277397/facebook-messenger-chatbot-how-do-i-collect-the-users-geo-location-that-they-sen) qui je pense est la bonne solution mais je n'arrive pas à la metre en place. \r\n\r\n\r\nYou get the location as attachment in message. See sample below:\r\n```\r\n\r\n{ mid: 'mid.1463464074086:96b149e1a047e47842',\r\n  seq: 2076,\r\n  attachments: \r\n    [ { title: 'Anupam\\'s Location',\r\n   url: 'https://www.facebook.com/l.php?u=https%3A%2F%2Fwww.bing.com%2Fmaps%2Fdefault.aspx%3Fv%3D2%26pc%3DFACEBK%26mid%3D8100%26where1%3D19.120002%252C%2B72.863715%26FORM%3DFBKPL1%26mkt%3Den-US&h=AAQH523sr&s=1&enc=AZNmEBjv3zHHm0_dYnEIC6j7EDsJNt8PZRZZyaXbIZ6VzjPsQUOOaMIPGtXFH17CevUiNK0_K594CgDQHAMQSru7uS_jjbkxojBWNwBnncqzaw',\r\n   type: 'location',\r\n   payload: [Object] } ] }\r\n```\r\nFrom the payload, you can access the Latitude and Longitude using:\r\n\r\n```\r\nlat = event.message.attachments[0].payload.coordinates.lat\r\nlng = event.message.attachments[0].payload.coordinates.long\r\n```\r\n\r\nJ'ai essayer de le mettre en place a cette [endroit](https://github.com/MaloRchrd/clope-bot/blob/master/index.js#L47) \r\n\r\nEn m'aidant de ce code [la](https://github.com/PatMyron/MessengerRainBot/blob/270754b85c387f0a4dbd21f784be282a77a44773/index.js#L32). \r\n\r\net de celui [la](https://github.com/jimmijazz/location_chatbot/blob/3251b012043dcb52547e11d42b9b692fd0b618fa/index.js#L34)\r\n\r\nMais impossible d'y arriver. help please 🤕  \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/MaloRchrd/clope-bot/issues/comments/259109146","html_url":"https://github.com/MaloRchrd/clope-bot/issues/1#issuecomment-259109146","issue_url":"https://api.github.com/repos/MaloRchrd/clope-bot/issues/1","id":259109146,"user":{"login":"MaloRchrd","id":17042850,"avatar_url":"https://avatars.githubusercontent.com/u/17042850?v=3","gravatar_id":"","url":"https://api.github.com/users/MaloRchrd","html_url":"https://github.com/MaloRchrd","followers_url":"https://api.github.com/users/MaloRchrd/followers","following_url":"https://api.github.com/users/MaloRchrd/following{/other_user}","gists_url":"https://api.github.com/users/MaloRchrd/gists{/gist_id}","starred_url":"https://api.github.com/users/MaloRchrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaloRchrd/subscriptions","organizations_url":"https://api.github.com/users/MaloRchrd/orgs","repos_url":"https://api.github.com/users/MaloRchrd/repos","events_url":"https://api.github.com/users/MaloRchrd/events{/privacy}","received_events_url":"https://api.github.com/users/MaloRchrd/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T11:07:05Z","updated_at":"2016-11-08T11:07:05Z","body":"je m'en doutais un peu c'est quoi la commande dans terminal pour relancer node\r\n"}}
{"actor":{"display_login":"MaloRchrd"}}