I want to get just the text of that last twitter post of a user. I found code that abstracts a users feed to the json format but How do I get the json vars to php vars? And in 'partucalar' the 'TEXT' var as seen below.
Here is the Script I am using to convert the twitter feed to json: LINK TO CODE HOWEVER, This is irrelevant to this question. I just need the output vars to become php vars. I was already down voted so I am giving more details.
Here is the json output:
{
"tweets": [
{
"url": "http://twitter.com/cosmocatalano/status/343768531101417474",
"text": "This is a test tweet. @ Sufferloft http://instagram.com/p/aWFnSJInU-/ ",
"html": "This is a test tweet. @ Sufferloft <a href=\"http://t.co/XRaizXhwYz\" rel=\"nofollow\" dir=\"ltr\" data-expanded-url=\"http://instagram.com/p/aWFnSJInU-/\" class=\"twitter-timeline-link\" target=\"_blank\" title=\"http://instagram.com/p/aWFnSJInU-/\" ><span class=\"invisible\">http://</span><span class=\"js-display-url\">instagram.com/p/aWFnSJInU-/</span><span class=\"invisible\"></span><span class=\"tco-ellipsis\"><span class=\"invisible\"> </span></span></a>",
"date": "1370795779",
"user": "/cosmocatalano",
"id": "14503633",
"img": "https://si0.twimg.com/profile_images/2225916199/image_normal.jpg",
"name": "Cosmo Catalano",
"rt": false,
"card": {
"href": "http://instagram.com/p/aWFnSJInU-/",
"data-url": "http://distilleryimage2.ak.instagram.com/9d54f23ed12211e29fe522000a1f97ce_5.jpg",
"data-resolved-url-large": "http://distilleryimage2.ak.instagram.com/9d54f23ed12211e29fe522000a1f97ce_7.jpg"
}
}
]
}
I want the TWEET text: // Example variable
$Tweet = jsondecode(text);
echo $Tweet;