

$api_key = urlencode('REPLACEWITHAPPAPIKEY') // Consumer Key (API Key) Register your app/webpage (You may need to verify your personal account mobile number too) How to get last few tweets of user with core PHP functionality only (no CURL or Twitter oAuth library needed): I know this isn't a pure js solution but again reading through the new Twitter API 1.1 docs they REALLY don't want you to do this client-side. Third: Download Twitter OAuth Library (In this case I used the PHP Library, additional libraries located here: )įourth: (If using PHP) Make sure cURL is enabled if your running on a LAMP here's the command you need: sudo apt-get install php5-curlįifth: Make a new PHP file and insert the following: Thanks to Tom Elliot get("".$twitteruser."&count=".$notweets) Įcho $tweets //testing remove for productionĪnd boom, you're done. Second: NOTE: Your Consumer Key / Secret along with Access Token / Secret (Just went through numerous docs, and devs suggest to do all oAuth server-side)įirst: sign up on, and make a new application. So you REALLY don't want to do this client-side anymore. To recap, all I am trying to do is grab the 3-4 latest tweets from my account. I would greatly appreciate any suggestions in this regard.

In addition, I keep reading that the most commonly used Twitter API will stop working soon because Twitter wants people to use their own, as opposed to third party. I added the following code snippet to the project, which works quite well, however, I am not sure how to update the snippet so it uses my Twitter account instead of the one it is set up with. I have been researching how to do this for quite some time now and having some trouble. I am simply trying to embed the 3-4 newest tweets on the site footer with no additional features of functionality. I am completely new to using Twitter in general and have never embedded "latest tweets" on any project.
