PHP Classes

Oauth access token into database

Recommend this page to a friend!

      PHP OAuth Library  >  PHP OAuth Library package blog  >  How Can the PHP OAuth...  >  All threads  >  Oauth access token into database  >  (Un) Subscribe thread alerts  
Subject:Oauth access token into database
Summary:saving the access token and reusing it without asking for login
Messages:46
Author:Prabhulal Ramesh
Date:2014-11-20 12:59:04
 
  1 - 10   11 - 20   21 - 30   31 - 40   41 - 46  

  41. Re: Oauth access token into database   Reply   Report abuse  
Picture of Prabhulal Ramesh Prabhulal Ramesh - 2014-11-23 04:44:46 - In reply to message 40 from Manuel Lemos
I had remove this part (.tumblr.com) but still getting same error ....

does tumblr have something like authorisation_header or scope ??

how get the rights to post by using scope in tumblr.... u have some working code ??




$success = $client->CallAPI(
'http://api.tumblr.com/v2/blog/'.$tumblrhostname.'.tumblr.com/posts',
'POST', $parameters, array('FailOnAccessError'=>true, 'RequestContentType'=>'application/json'), $user1);


$success = $client->CallAPI(
'http://api.tumblr.com/v2/blog/'.$tumblrhostname.'/posts',
'POST', $parameters, array('FailOnAccessError'=>true, 'RequestContentType'=>'application/json'), $user1);

  42. Re: Oauth access token into database   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-11-23 05:00:05 - In reply to message 41 from Prabhulal Ramesh
I don't think the RequestContentType should be application/json because it is a regular POST request, so all parameters should be sent in an array.

  43. Re: Oauth access token into database   Reply   Report abuse  
Picture of Prabhulal Ramesh Prabhulal Ramesh - 2014-11-23 05:15:03 - In reply to message 42 from Manuel Lemos
still not got the issue resolved :-(

example for parameter and callapi will help i think.

  44. Re: Oauth access token into database   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-11-23 05:31:01 - In reply to message 43 from Prabhulal Ramesh
Did you change the definition of the parameters to an array? What is the code you are using now?

  45. Re: Oauth access token into database   Reply   Report abuse  
Picture of Prabhulal Ramesh Prabhulal Ramesh - 2014-11-23 11:25:08 - In reply to message 44 from Manuel Lemos
Lemos I just now Got my answer , You were absolutely right.... array as parameter worked,


but i made a very very small mistake... i used /posts instead of /post in url ....


but now i am just getting Test title getting posted but not the link and description


// $parameters = new stdClass;
$parameter = array( "title"=>"Test title",
"url"=>"http://www.google.com",
"description"=>"sample description from app") ;

$success = $client->CallAPI(
'http://api.tumblr.com/v2/blog/'.$tumblrhostname.'.tumblr.com/post',
'POST', $parameter, array('FailOnAccessError'=>true, array()), $user1);

  46. Re: Oauth access token into database   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-11-23 22:18:00 - In reply to message 45 from Prabhulal Ramesh
You need to check with Tumblr documentation yourself for what you are trying to do.

 
  1 - 10   11 - 20   21 - 30   31 - 40   41 - 46