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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.