I am trying to develop a simple response to a wechat user defined menu button that generates a click event. the response is an static map image of the senders location. I have the response working in testing to a sent location message and returning the rich media response with the url of the static map. What I need is for the Event click to fire the location message that my site will respond to. I can't seem to find where to set the actions that the button would execute. can anyone help, sorry if I'm not clear enough.
To get a user's location from a click event you would need a few things.
Your menu item needs to of type click
"button":[
{
"type":"click",
"name":"Get Location",
"key":"location"
}]
Next you would need to setup a auto response for the keyword "location" that would return the user's location
You need to enable user location settings on admin.wechat.com first. Go to Service -> My Service. Under Advanced API enable "Obtain the user's location(Disabled)"
Look at the documentation here to get the user's location: http://admin.wechat.com/wiki/index.php?title=User_Location