ymkjp / opensocial-php-client

Automatically exported from code.google.com/p/opensocial-php-client
Apache License 2.0
0 stars 0 forks source link

NetlogProvider lacks method to add required signing to POST requests #73

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. initiate OAuth authentication with an instance of osapiNetlogProvider as 
provider argument 
2. try submitting a notification osapiMessage type 'notification'
3.

What is the expected output? What do you see instead?
It should post a notification to the indicated user(s) but instead returns a 
401 not authorised

What version of the product are you using? On what operating system?
Does not depend on OS, and occurs with version 1.1.1. of the library

Please provide any additional information below.

adding the following method to the class in netlogProvider.php should do the 
trick:

  public function preRequestProcess(&$request, &$method, &$url, &$headers, osapiAuth 
&$signer) {
    if (method_exists($signer, 'setUseBodyHash')) {
      $signer->setUseBodyHash(true);
    }
  }

Original issue reported on code.google.com by wouters...@gmail.com on 15 Apr 2010 at 8:45

Attachments:

GoogleCodeExporter commented 9 years ago
I've the same problem (for MySpace). For the authentification, do you use a 
token ? 
I think it's the problem, but i don't know how make this...

Original comment by sore...@gmail.com on 15 Apr 2010 at 9:42

GoogleCodeExporter commented 9 years ago
Actually, adding the preRequestProcess() method mentioned above to 
netlogProvider.php 
effectively solves the problem.

Original comment by wouters...@gmail.com on 18 Apr 2010 at 3:58