Hello,
I am using the iPhone SDK to try to upload video and or photos from the demo application.
It updates status just fine, but when I try to upload video or photo I get 401 Unauthorized. See below for complete details.
Is this a question of permissions? The page http://developerwiki.myspace.com/index.php?title=Extended_Permissions gives examples of adding the permission string for Open ID urls.
Where in the External Application Authentication process should the myspaceid.permissions=AddPhotosAlbums be added? To which URL call?
Does the AddPhotosAlbums also include permission to upload video? These seem to be issues with the opensocial implementation than with the iPhone specifics. The URLs the MySpace iPhone app are dramatically different from the ones we seem to be able to use.
Also, its not entirely clear to me how to set External Callback Validation. I have it set to myspaceid2://oauthcallback/ - is that correct? What do you use for the External URL with an iPhone application?
Thank you for your help,
Mark Morris.
This is what I get from Paros:
trying to upload a photo - returns 401 Unauthorized
POST http://opensocial.myspace.com/roa/09/mediaitems/@me/@self/myspace.com.album.609983?xoauth_requestor_id=441897556&type=IMAGE&CAPTION=myimage HTTP/1.1
Host: opensocial.myspace.com
User-Agent: MySpaceID.Demo/1.0 CFNetwork/459 Darwin/10.0.0d3 Paros/3.2.13
Content-Type: image/png
Authorization: OAuth realm="", oauth_consumer_key=".....", oauth_token="rAM%252Bquykbq1mysPdmxNeP1ZWtTVOicNoCNrsK3wD9izwD0d3XSyQXxj2S0BgwzpDWIJ4XXd3szGmrQ3YhdjqOCqiHt3Q2c46u9dfldpWPsA%253D", oauth_signature_method="HMAC-SHA1", oauth_signature="8YnnsbMUBRgzWi%2BklCCwqegNFp4%3D", oauth_timestamp="1271742666", oauth_nonce="AF737F53-374E-4886-8803-7883FEE4E763", oauth_version="1.0"
Accept: */*
Accept-Language: en-us
Cookie: MSCulture=IP=69.228.93.40&IPCulture=en-US&PreferredCulture=en-US&PreferredCulturePending=&Country=VVM=&ForcedExpiration=0&timeZone=0&myStuffDma=&myStuffMarket=&USRLOC=QXJlYUNvZGU9NTEwJkNpdHk9T2FrbGFuZCZDb3VudHJ5Q29kZT1VUyZDb3VudHJ5TmFtZT1Vbml0ZWQgU3RhdGVzJkRtYUNvZGU9ODA3JkxhdGl0dWRlPTM3Ljc5NSZMb25naXR1ZGU9LTEyMi4yMTkzJlBvc3RhbENvZGU9JlJlZ2lvbk5hbWU9Q0E=
Pragma: no-cache
Content-Length: 282893
Connection: keep-alive
Proxy-Connection: keep-alive
trying to upload a video - returns 401 Unauthorized
POST http://opensocial.myspace.com/roa/09/mediaitems/@me/@self/@videos?xoauth_requestor_id=441897556&type=video&caption=myvideo HTTP/1.1
Host: opensocial.myspace.com
User-Agent: MySpaceID.Demo/1.0 CFNetwork/459 Darwin/10.0.0d3 Paros/3.2.13
Content-Type: video/quicktime
Authorization: OAuth realm="", oauth_consumer_key="....", oauth_token="rAM%252Bquykbq1mysPdmxNeP1ZWtTVOicNoCNrsK3wD9izwD0d3XSyQXxj2S0BgwzpDWIJ4XXd3szGmrQ3YhdjqOCqiHt3Q2c46u9dfldpWPsA%253D", oauth_signature_method="HMAC-SHA1", oauth_signature="v3PwhCsY1wInRZFUk7iwRjmKv%2Bg%3D", oauth_timestamp="1271742701", oauth_nonce="AB6449CA-E26E-4FCC-B7A3-416CC8294107", oauth_version="1.0"
Accept: */*
Accept-Language: en-us
Cookie: MSCulture=IP=69.228.93.40&IPCulture=en-US&PreferredCulture=en-US&PreferredCulturePending=&Country=VVM=&ForcedExpiration=0&timeZone=0&myStuffDma=&myStuffMarket=&USRLOC=QXJlYUNvZGU9NTEwJkNpdHk9T2FrbGFuZCZDb3VudHJ5Q29kZT1VUyZDb3VudHJ5TmFtZT1Vbml0ZWQgU3RhdGVzJkRtYUNvZGU9ODA3JkxhdGl0dWRlPTM3Ljc5NSZMb25naXR1ZGU9LTEyMi4yMTkzJlBvc3RhbENvZGU9JlJlZ2lvbk5hbWU9Q0E=
Pragma: no-cache
Content-Length: 282893
Connection: keep-alive
Proxy-Connection: keep-alive
update status returns 200 OK
PUT http://api.myspace.com/v1/users/441897556/status.xml HTTP/1.1
Host: api.myspace.com
User-Agent: MySpaceID.Demo/1.0 CFNetwork/459 Darwin/10.0.0d3 Paros/3.2.13
Content-Type: application/x-www-form-urlencoded
Authorization: OAuth realm="", oauth_consumer_key="...", oauth_token="rAM%252Bquykbq1mysPdmxNeP1ZWtTVOicNoCNrsK3wD9izwD0d3XSyQXxj2S0BgwzpDWIJ4XXd3szGmrQ3YhdjqOCqiHt3Q2c46u9dfldpWPsA%253D", oauth_signature_method="HMAC-SHA1", oauth_signature="l09oSKlV2k8MbqZsiRikrlUSjis%3D", oauth_timestamp="1271743117", oauth_nonce="16B96EEE-6A8A-402C-A9A6-CBB627B2931F", oauth_version="1.0"
Accept: */*
Accept-Language: en-us
Cookie: MSCulture=IP=69.228.93.40&IPCulture=en-US&PreferredCulture=en-US&PreferredCulturePending=&Country=VVM=&ForcedExpiration=0&timeZone=0&myStuffDma=&myStuffMarket=&USRLOC=QXJlYUNvZGU9NTEwJkNpdHk9T2FrbGFuZCZDb3VudHJ5Q29kZT1VUyZDb3VudHJ5TmFtZT1Vbml0ZWQgU3RhdGVzJkRtYUNvZGU9ODA3JkxhdGl0dWRlPTM3Ljc5NSZMb25naXR1ZGU9LTEyMi4yMTkzJlBvc3RhbENvZGU9JlJlZ2lvbk5hbWU9Q0E=; ASP.NET_SessionId=3osogk55oufvqfzl1wqnso55
Pragma: no-cache
Content-Length: 41
Connection: keep-alive
Proxy-Connection: keep-alive