Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("ID OU CLASS DO BOTÃO OU DO FORM").submit(function(e) {
- e.preventDefault();
- data_string = "channel=" + CANALAQUI;
- $.ajax({
- type: "POST",
- url: "LINK",
- data: data_string,
- dataType: "text",
- cache: false,
- success: function (data) {
- if(data == "followed") {
- document.getElementById("IDDOBOTAO").innerHTML = "HTML AQUI";
- }
- }
- });
- return false;
- });
- NO PHP:
- $channel_name = $_POST["channel"]
- $twitch_functions->follow($channel_name, $_SESSION['twitch_token'])
- echo "yes";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement