Permalink
Browse files

Twitter test 2

  • Loading branch information...
1 parent 3da7c51 commit 3c5b50e59d005f99265c42cea5a5cabe864b569e @nicogiard committed Mar 10, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −1 app/controllers/Application.java
  2. +3 −2 app/utils/Twitter.java
@@ -114,7 +114,7 @@ public static void save(@Required @Valid Torrent torrent, File file, String tags
torrent.save();
try {
- Twitter.init().setStatus("New : " + torrent.filename);
+ Twitter.init().setStatus("New : " + torrent.filename + " - http://bit.ly/xWYR4A");
} catch (Exception e) {
Logger.error(e.getMessage(), e);
}
View
@@ -9,8 +9,8 @@
public class Twitter {
private String username = "pisteurNAS";
- private String token = "520216648-fTEy2CSiboeezJ9aNmkp6ki4wJpQNmloUdzeCJsf";
- private String secret = "TTgIa1EDeaeehiYwDJrtR62qZlvyG5DA9luBzScr4Ic";
+ private String token = "520216648-Ddb7eVejDNSYaUKRCZpz1yVGUM5wUWdnGgAjJMsG";
+ private String secret = "hJvAI7ZCEqySqmT1U7OdIFaEGIk9Ks5sEe3FgNhHA";
public static Twitter instance;
@@ -35,6 +35,7 @@ public static Twitter init() {
public String setStatus(String status) throws Exception {
String url = "http://twitter.com/statuses/update.json?status=" + URLEncoder.encode(status, "utf-8");
String response = WS.url(url).oauth(TWITTER, token, secret).post().getString();
+ Logger.debug("Twitter|setStatus : response = %s", response);
return response;
}
}

0 comments on commit 3c5b50e

Please sign in to comment.