I've been doing a little help with the development of the public platform.
Get access token
HTTP request mode: GET
Https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET
Normally, the following JSON packets are returned to the public number:
{"Access_token": "Access_token", "expires_in": 7200}
The above is the public platform on the official website of the document to get Access_token part of the content, now have questions ah
At present I only know by copying the above URL to the address bar to get to Access_token, if the use of code, how to do?
I tried two ways, one using file_get_contents, invalid, and the other using the Getjson method in jquery (because I looked at the JSON data returned by the interface) and failed.
So, messy, how does this get, how code is implemented?
Help, thanks.
Share to: more
------Solution--------------------
Use curl to put. There's an example https://github.com/spetacular/weixin/blob/master/weixin.class.php
------Solution--------------------
Should use curl as said upstairs, how about jquery in the server-side? You're alive. His authorization token should use the server back and forth when applying for the account? I don't have a public account yet, but I guess that's what it looks like.