Encoding a twitter response

44 views Asked by At

I am pulling in my twitter feed with this.

https://github.com/J7mbo/twitter-api-php

$details = json_decode($result, true);

I decode and return the ajax request, however it is returned in text so typically I will get

@myname
This is my interesting post #done ✔️  https://shortednedurl @myhandle #help

How can I turn the links, hashtags and the twitter usernames into links?

Edit: I tried this

val =  encodeURIComponent(myArray[1][0]);
 $('.twitter p').eq(1).html(val);

but it just returns an encoded string rather than turning into html.

Up%20against%20great%20competition%20
0

There are 0 answers