Comments (3)
I've added the application/json header to all outgoing requests, see:
http://code.google.com/p/opensocial-php-client/source/detail?r=87
Please do verify if the fix works for you and set the issue to 'Verified' if it
did.
Thanks for the report!
Original comment by chabotc
on 10 Mar 2009 at 12:13
- Changed state: Fixed
from opensocial-php-client.
I'm a confused as to how this will work. Inside io/osapiCurlProvider.php the
only use
of $headers is
if ($headers) {
curl_setopt($ch, CURLOPT_HEADER, true);
}
This won't actually set the headers. I think you might need to add a parameter
to the
function, and explicitly set CURLOPT_HTTPHEADER.
if ($httpRequestHeaders) {
curl_setopt($ch, CURLOPT_HTTPHEADER, $httpRequestHeaders);
}
Also the class io/osapiRestIO.php should stop signing the postBody now since the
content-type is nolonger www-form-urlencoded
(http://oauth.net/core/1.0/#anchor14)
Thanks!
Chirag
Original comment by [email protected]
on 10 Mar 2009 at 5:41
from opensocial-php-client.
http://code.google.com/p/opensocial-php-client/source/browse/trunk/src/osapi/io/
osapiCurlProvider.php
has been updated in svn to set the CURLOPT_HTTPHEADER with the $headers.
The release however doesn't have this yet, once everything in regards to signing
settles we'll do another release update.
The OAuth signing is confusing me slightly at the moment. The OAuth spec says
that
non-www-form-urlencoded requests shouldn't be signed, however Java based
containers
can't calculate the OAuth signature of form-urlencoded POSTS (since it doesn't
make
the POST body available then). So their solution is, I think, to *not* include
the
body for the form-urlencoded POST's, but *do* include it for application/json
content-type posts.
So the code in svn currently reflects this thinking; However there is some
discussion
on the oauth and opensocial spec lists on what the official way of doing this
will
be, so there's no guarantee this will be final just yet.
Once the spec discussion has been settled, I'll update the code here right away
too
Original comment by chabotc
on 14 Mar 2009 at 9:48
from opensocial-php-client.
Related Issues (20)
- Signing urls using osapiSecurityToken on hi5 fails to generate valid URL
- Myspace notifications button0_params argument must be double encoded HOT 1
- Orkut media items does not work. HOT 1
- Fatal error iin osapi/io/osapiRestIO.php on line 82 HOT 1
- osapiMediaItem incorrectly returns invalid mimetype HOT 1
- Add LinkedIn Support
- Memcache storage always removes token when you do a storage get with no expiration
- Netlog provider does not (fully) support RPC HOT 2
- What when you use the OAuth for userlogin on your site?
- statusmoodcomments in myspace
- unable to get more than 89 friends when I have over 6,000 - trying to get 10 friends only returns 8 etc HOT 1
- error 401 for PUT HOT 1
- NetlogProvider lacks method to add required signing to POST requests HOT 2
- Ning Support for the opensocial-php-client library HOT 2
- Quepasa.com __init__.php authentication support HOT 2
- mediaItems on activities
- Add (myspace specific) msUserType field to osapiPerson class HOT 1
- osapiException raised : Duplicate key in osapiBatch
- Error in two legged OAuth signature generation HOT 1
- Status post with apostrophe is not posted correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opensocial-php-client.