Commit e3a753ae by Bagus Pambudi

test autopost to alia

parent 0f304e17
......@@ -179,6 +179,21 @@ class PostController extends Controller
// $this->socialRepo->sendTweetWithMedia($setting['header_admin'].'-'.$title."\n\n".$url."\n\n".$hashtag, [$img]);
// }
// }
$client = new Client([
'headers' => [
'Accept' => 'application/json',
// 'Authorization' => 'Bearer ' . session('token')
],
'form_params' => ['url' => url('post/'.$data['slug'])]
]);
$result1 = $client->post('https://alia.unesa.ac.id/api/posts');
$value = json_decode($result1->getBody()->getContents(), true);
dd($value);
}
}
......
......@@ -176,6 +176,13 @@
$("#fmkey_5").show();
$("#fmkey_6").hide();
}
if (type == 'alia') {
$("#key_1").html('URL');
$("#fmkey_1").show();
$("#key_2").html('POSTS');
$("#fmkey_2").show();
}
});
</script>
@stop
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment