/// <summary> /// 公有应用API使用方法。 /// </summary> private static void PublicAppSample() { var auth = new PublicAppAuth(appKey, appSecret, appRedirectUrl, "read_basic"); var token = auth.GetToken(code); Console.WriteLine(token); var api = new Api(token); var response = api.Get("customers"); Console.WriteLine(response.Content); }
public void SetUp() { auth = new PublicAppAuth(appKey, appSecret, "http://baidu.com", scope); }