mardi 23 février 2016

Curl request to twitter API using laravel 5.1

just start using curl don't know much about it i am trying to send a request to twitter API using laravel 5.1 through Curl that's my Controller code

public function getTwitterLogin($auth=NULL){
    if($auth == 'auth')
    {
        Hybrid_Endpoint::process();
        return;
    }
    try{
        $oauth=new Hybrid_Auth(app_path(). '/config/twitterAuth.php');
        $provider=$oauth->authenticate('Twitter');
        $client->getHttpClient()->setDefaultOption('verify', 'D:\General software');
       //curl_init();
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL, 'https://api.twitter.com/1.1/users/search.json');
        $result = curl_exec($curl);
          var_dump($result);

i downloaded a curl folder from curl website and place the curl.exe file in D:\General software and changed the environment variable path also but now its replying that Undefined variable: client



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire