Closed iceberg901 closed 12 years ago
For reference, here's a frame from my queue that I can share succsessfully:
http://api.shelby.tv/v1/frame/5069e575b415cc2867000804/share
And by the way my user is user id 4f901c9eb415cc540e000328, nickname joshua_shelby_2
And my queue/watch later roll is roll id 4f901c9fb415cc540e00032e
the 404 should also have a status message associated, can you include that?
actually, the entire request/response would be useful, as your user should have no problem sharing that frame, unless the request is malformed.
Request URL:http://api.shelby.tv/v1/frame/506dff9cb415cc44bc0029a7/share Request Method:POST Status Code:404 Not Found Request Headersview source Accept:application/json, text/javascript, /; q=0.01 Accept-Charset:ISO-8859-1,utf-8;q=0.7,_;q=0.3 Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en;q=0.8 Cache-Control:no-cache Connection:keep-alive Content-Length:88 Content-Type:application/json Cookie:qca=P0-1424272830-1342210099062; _nos_shelby_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWFkMWU5NjMzZTFhODMwMDZmNGUzODBmZTMyZWU0ZDIzBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMWFKbmlkaU5ZQTVaM3FrODlQRDZLZmxINmJYRzZvMTNzZm9nU0JsTUliczQ9BjsARg%3D%3D--dce5d34261f945c259cede7210eb5d795b8f334f; gt_roll_invite=4e4bf2baf6db2420d3000001%2Call%40shelby.tv%2C50103a10b415cc061100136f; km_lv=x; remember_user_token=BAhbB1sGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVRpAZBpIWkBnmkBtGkaaQHMaVlpE2kAaQhpLUkiKThiOWE0YWU4LWNkNzgtNGI5Yi05NGFjLTg3ODk0YzhmMGU2MAY6BkVG--c20565e8f8060598d137db09e354d3322b511388; _shelby_gt_common=authenticated_user_id%3D4f901c9eb415cc540e000328%2Ccsrf_token%3D6kax6fsWDnL4QgDpvuD8Sn4DDmuxwwbLlmTRua3sHdI%3D; _shelby_gt_web_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWQxMWExZWIwZGQ1MjhiMTczNzMwYjQ1ZWQ1MjY5ZmMwBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMXplTEo0czF2OGZ5amplV0N3dmlZVi8vTjRmd0ZyYllxa0pkOGFReDQ1Nms9BjsARg%3D%3D--fd8748a49efa3f0d5e3d5c27c2d23734df073b97; kvcd=1349456125940; km_ai=joshua_shelby_2; km_ni=joshua_shelby_2; utma=37832673.743541398.1342026383.1349455673.1349456125.152; utmb=37832673.5.9.1349462792173; utmc=37832673; __utmz=37832673.1349455673.151.53.utmcsr=4f901c9eb415cc540e000328|utmccn=email-share|utmcmd=506f0ef188ba6b28bc00178e; km_uq=; _shelby_gt_api_session=BAh7CUkiD3Nlc3Npb25faWQGOgZFRkkiJTZkMWI1YmY4YzVjN2VjOTI4ZGYzZGI2NWM4ZGU1OGMzBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMTZrYXg2ZnNXRG5MNFFnRHB2dUQ4U240RERtdXh3d2JMbG1UUnVhM3NIZEk9BjsARkkiCm9hdXRoBjsARnsGSSIMdHdpdHRlcgY7AEZ7BkkiF2NhbGxiYWNrX2NvbmZpcm1lZAY7AEZUSSIZd2FyZGVuLnVzZXIudXNlci5rZXkGOwBUWwhJIglVc2VyBjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVRpAZBpIWkBnmkBtGkaaQHMaVlpE2kAaQhpLUkiIiQyYSQxMyRsdFZMby83T3l5Z3NSZ3BxYTNFa21PBjsAVA%3D%3D--390b96199df7cb8e5b43996bcb2cc1fe7d1d42a5 Host:api.shelby.tv Origin:http://shelby.tv Pragma:no-cache Referer:http://shelby.tv/queue User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_74) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4 X-CSRF-Token:6kax6fsWDnL4QgDpvuD8Sn4DDmuxwwbLlmTRua3sHdI= Request Payload {"destination":["email"],"text":"Some other video","addresses":"iceberg901@hotmail.com"} Response Headersview source Access-Control-Allow-Credentials:true Access-Control-Allow-Headers:X-Requested-With, X-Prototype-Version, X-CSRF-Token, X-Shelby-User-Agent Access-Control-Allow-Methods:PUT, POST, DELETE Access-Control-Allow-Origin:http://shelby.tv Access-Control-Max-Age:1728000 Access-Control-Request-Method: Cache-Control:no-cache Connection:keep-alive Content-Encoding:gzip Content-Type:application/json; charset=utf-8 Date:Fri, 05 Oct 2012 18:46:47 GMT Server:nginx/1.0.10 + Phusion Passenger 3.0.11 (mod_rails/mod_rack) Set-Cookie:_shelby_gt_api_session=BAh7CUkiD3Nlc3Npb25faWQGOgZFRkkiJTZkMWI1YmY4YzVjN2VjOTI4ZGYzZGI2NWM4ZGU1OGMzBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMTZrYXg2ZnNXRG5MNFFnRHB2dUQ4U240RERtdXh3d2JMbG1UUnVhM3NIZEk9BjsARkkiCm9hdXRoBjsARnsGSSIMdHdpdHRlcgY7AEZ7BkkiF2NhbGxiYWNrX2NvbmZpcm1lZAY7AEZUSSIZd2FyZGVuLnVzZXIudXNlci5rZXkGOwBUWwhJIglVc2VyBjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVRpAZBpIWkBnmkBtGkaaQHMaVlpE2kAaQhpLUkiIiQyYSQxMyRsdFZMby83T3l5Z3NSZ3BxYTNFa21PBjsAVA%3D%3D--390b96199df7cb8e5b43996bcb2cc1fe7d1d42a5; domain=.shelby.tv; path=/; HttpOnly Status:404 Transfer-Encoding:chunked X-Powered-By:Phusion Passenger (mod_rails/mod_rack) 3.0.11 X-Rack-Cache:invalidate, pass X-Request-Id:eee365c66809593e15e4e93a6d768423 X-Runtime:0.027690 X-UA-Compatible:IE=Edge,chrome=1
{"status": 404, "message": "no valid frame to share" }
This is failing b/c you queued that video and it has no ancestors...
If a user queues a video via the extension, it goes on the queue (aka watch later roll) w/o and ancestors. If they try to share that video, it fails b/c we don't want people getting linked to your private queue (a fix built by @markerrj ).
If we allowed this frame to be shared, anybody viewing the share would see this (private) watch later roll.
What we could do:
1) Build a mechanism allowing users to view a single frame, even if it's from a private roll
2) share a link to the SEO video page instead of to the frame on the roll when there isn't a good frame to share (see FrameConroller#share
and FrameController#get_frame_to_share
)
I like #2. Thoughts @markerrj @iceberg901 ?
I also like #2. I even think it's kind of elegant, and it fits in well with the link strategy that Henry and I discussed.
Basically, all shares will be shares of the single video page URL, and we just won't have a "roll" param for vids like this one, so the single video page won't display any roll.
Ok, then fixing this gets subsumed into the implementation of the link strategy you've been discussing w/ @hsztul .
Implemented a fallback measure for the moment: if a frame has no ancestors, we create a shortlink or share based on the video itself. Closing.
Can't share this frame, which is in my queue. I'll try to leave it in there until this gets resolved.
http://api.shelby.tv/v1/frame/506dff9cb415cc44bc0029a7/share
produces a 404 error.
This seems to be isolated as I can share some other frames I've tried in my queue.