Posts

Showing posts from September, 2016

Twitter API with PHP

Image
In order to use a communicante with a website ( in this case twitter) , we need to call it's  api But there too many standars to communicate with api ( OAuth1, OAuth2...) , hopefully they provides api documentation . In this tutoriel we are gonna use twitter api ( 1.1  ) as exemple to get ou last tweets , but first we have to create twitter application Creating twitter application give us  some random strings `consumer_secret`, `consumer_key`, `access_token` and  `access_token_secret` We will use these strings later in OAuth process. Don't panic no need to knowing all OAuth process using  php , Moreover, there are many php libraries and packages to do this for us , there is a very popular one ( twitter-api-php ) first we create an empty folder for our project then require the package : composer require  j7mbo/twitter-api-php copy and past random strings from your twitter application in to this array  variable :  $settings = array ( ' oau