fanti
fanti

Reputation: 1927

Tweet clickable links with twitteroauth?

I'm using twitteroauth from https://github.com/abraham/twitteroauth like this:

 $Twitter = new TwitterOAuth(...);
 $Twitter->post('statuses/update', array('status' => 'click <a href="http://google.com">here</a>'));

Tweeted URLs are shown as plain text and not clickable. How do I post a real Link?

Upvotes: 2

Views: 2279

Answers (3)

Son Dao
Son Dao

Reputation: 502

You don't need <a /> tag to post link to Twitter. Do it like this:

 $Twitter = new TwitterOAuth(...);
 $Twitter->post('statuses/update', array('status' => 'click here: http://google.com'));

Upvotes: 2

frosty
frosty

Reputation: 769

Have you tried posting the link with out the HTML markup and with http:// - posting http://www.google.com vs www.google.com, I'm using the same API and that seems to work for me, but creating the hyperlink as you would in HTML, doesn't seem to work. And now that that I think of it, I don't know that I've ever run across a hyperlink style link in Twitter or TweetDeck, just URL's that are run through a shortener...

Upvotes: 3

El Barto
El Barto

Reputation: 929

I think it's a Twitter issue, it escapes all HTML code: http://support.twitter.com/entries/13920-frequently-asked-questions#html

Upvotes: 1

Related Questions