{"id":193,"date":"2020-03-17T13:11:30","date_gmt":"2020-03-17T05:11:30","guid":{"rendered":"https:\/\/badgameshow.com\/fly\/?p=193"},"modified":"2020-05-19T14:31:06","modified_gmt":"2020-05-19T06:31:06","slug":"okhttp-post","status":"publish","type":"post","link":"https:\/\/badgameshow.com\/fly\/okhttp-post\/","title":{"rendered":"Okhttp POST"},"content":{"rendered":"<pre><code class=\"language-Java line-numbers\">FormBody body = new FormBody.Builder()\n            .add(\"client_id\", \"732455797163076\")\n            .add(\"client_secret\", \"c62af5089291c704126536193d8009a5\")\n            .add(\"grant_type\", \"authorization_code\")\n            .add(\"redirect_uri\", redirectUri)\n            .add(\"code\", code)\n            .build();\n\n    Request request = new Request.Builder()\n            .url(\"https:\/\/api.instagram.com\/oauth\/access_token\")\n            .post(body)\n            .build();\n\n    new OkHttpClient().newCall(request).enqueue(new Callback() {\n        @Override\n        public void onFailure(Call call, IOException e) {\n            Log.d(\"social\", \"onFailure: \");\n        }\n\n        @Override\n        public void onResponse(Call call, Response response) throws IOException {\n            Log.d(\"social\", \"onFailure:\" + response.body().string());\n        }\n    });\n<\/code><\/pre>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>FormBody body = new FormBody.Builder() .add(&#8220;client_id&#8221; &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"pgc_sgb_lightbox_settings":"","footnotes":""},"categories":[11],"tags":[13,14,39],"class_list":["post-193","post","type-post","status-publish","format-standard","hentry","category-okhttp","tag-android","tag-java","tag-okhttp"],"_links":{"self":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/comments?post=193"}],"version-history":[{"count":3,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/193\/revisions"}],"predecessor-version":[{"id":493,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/193\/revisions\/493"}],"wp:attachment":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/media?parent=193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/categories?post=193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/tags?post=193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}