nomad3212 Posted June 13, 2011 Share Posted June 13, 2011 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 !!!! Quote Link to comment https://forums.phpfreaks.com/topic/239254-dopplr-api-implementation/ Share on other sites More sharing options...
gizmola Posted June 13, 2011 Share Posted June 13, 2011 Please use php or code tags around any further code. I editted your post this time. Quote Link to comment https://forums.phpfreaks.com/topic/239254-dopplr-api-implementation/#findComment-1229296 Share on other sites More sharing options...
nomad3212 Posted June 15, 2011 Author Share Posted June 15, 2011 I'm sorry. I will remember this next time i post any php code. Quote Link to comment https://forums.phpfreaks.com/topic/239254-dopplr-api-implementation/#findComment-1229814 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.