Have done WeChat public platform development of Help brother Ah thank you, how to solve

Source: Internet
Author: User
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.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.