Chris Mccabe
Chris Mccabe

Reputation: 1951

t.co messing up my url when posting through api

im using php and the twitter api library- when i send my message through the following code my links get messed up- as far as I know I'm using the standard twitter php api?

$result = $this->tweet->call('post', 'statuses/update', array('status' => $title));

before i post

testing link tracking http://bit.ly/tvHaWN

after i post

testing link tracking http://t.co/ptdXXNDH<br>

anyone else had a similar problem?

Upvotes: 0

Views: 110

Answers (1)

antyrat
antyrat

Reputation: 27765

As I can suggest your $title variable contains of mixed text and HTML. Twitter statuses need to be plain text. Stripping tags should help.

Try to strip all HTML tags inside $title variable.

For example:

$result = $this->tweet->call('post', 'statuses/update', array('status' => strip_tags($title)));

Upvotes: 1

Related Questions