0

I want to post a text on twitter which will hyperlink with one Url. is this Possible? any way to implement this.I read some blog and posts that this is not supported by Twitter. There is any alternate to implement this one in my android application.

M using Twitter4J . Code is below.

String verifier = uri.getQueryParameter("oauth_verifier");
AccessToken accessToken = twitter.getOAuthAccessToken(requestToken, verifier);
String token = accessToken.getToken(), secret = accessToken.getTokenSecret();
twitter.setOAuthAccessToken(token, secret);
StatusUpdate status = new StatusUpdate("Listening"+"<a href "+base_link_url+"</a>");
//status.setMedia(file);
twitter.updateStatus(status);               

This is posting hyperlink as text. Kindly suggest me on that issue.

4

1 回答 1

1

你不必做任何事情。Twitter 会自动识别你的链接(URL) 这样做

 StatusUpdate status = new StatusUpdate("Listening  "+"https://www.google.co.in/");
于 2012-11-05T07:48:49.343 回答