Jump to content

Dopplr API Implementation


nomad3212

Recommended Posts

Hi,

      I have a requirement in my project to integrate Dopplr API. I have to use Oauth algorithm for Dopplr. The process of request token, authorise token and access token are executed successfully and i am also getting the authorization tokens accurately. The problem is, I am not able to extract the contents such as trip info, place info, etc. This is the code i wrote for integrating dopplr:

 

<?php

// app/controllers/example_controller.php

class ExampleController extends AppController {

    		
	public $uses = array();

    
	public $components = array('OauthConsumer');



    		public function index() {

        		
		$requestToken = $this->OauthConsumer->getRequestToken('Dopplr', 'https://www.dopplr.com/oauth/request_token', 'http://192.168.1.225:8056/Kishenr/dopplr/example/dopplr_callback');

        		$this->Session->write('dopplr_request_token', $requestToken);

        		$this->redirect('https://www.dopplr.com/oauth/authorize?oauth_token=' . $requestToken->key);

    		}



    		public function dopplr_callback() {

        
	$requestToken = $this->Session->read('dopplr_request_token');

        	$accessToken = $this->OauthConsumer->getAccessToken('Dopplr', 'https://www.dopplr.com/oauth/access_token', $requestToken);

	//print_r($accessToken);exit;

        	$temp = $this->OauthConsumer->get('Dopplr', $accessToken->key, $accessToken->secret, 'https://api.dopplr.com/traveller_info');
	print_r($temp);

    		}

}

?>

 

Can anyone help me please ??? I would really appreciate your help in this !!!!

Link to comment
https://forums.phpfreaks.com/topic/239254-dopplr-api-implementation/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.