I use the SpringPad Chrome plugin to capture links. When I do this, an image of the full website is created and the URL to this image (on S3) is set as the value of the "Image" property of the created bookmark block. I'm trying to create bookmarks programatically, using the API. I'm currently scanning the page the link accesses and finding an image on the page and setting that image's URL to the "image" property of my newly created bookmark, but I am having problems accessing the image after the block is created.
string url = "http://springpad.com/api/users/me/commands";
string content = "[[\"create\", \"Bookmark\", \"/UUID(" + foo + ")/\"]]";
var response = await OauthService.SendPost(url, content);
content = "[[\"set\", \"/UUID(" + uuid + ")/\", \"url\", \"" + theUrl + "\"],";
content += "[\"set\", \"/UUID(" + uuid + ")/\", \"name\", \"" + title + "\"],";
content += "[\"set\", \"/UUID(" + uuid + ")/\", \"text\", \"" + contentTag + "\"],";
content += "[\"set\", \"/UUID(" + uuid + ")/\", \"image\", \"" + imageUrl + "\"],";
content += "[\"set\", \"/UUID(" + uuid + ")/\", \"workbooks\", [\"" + uuid.Replace("/UUID(", "").Replace(")/", "") + "\"]]]";
response = await OauthService.SendPost(url, content);
Both of these operations complete without and error.
Later, when I retrieve the block, the value of the image property is ""https://springpad-user-data.s3.amazonaws.com/www.google.com/images/srpr/logo9w.png". If I try to access this URL in the browser, I receive this back...
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>1E7047FEA548F848</RequestId>
<HostId>
rO+0TJMLNgkf8j3D2QCIV+uufRi3Btkp4t+rtM0ExlD6wWkryb0SALWtzMQgNsF4
</HostId>
</Error>
So, the questions I have are these.
- Is it possible to use the API to generate images of the site being bookmarked and attach them as the value of the "image" property on a bookmark?
- If not, what is the proper way to set an image found on the site as the "image" property of the bookmark?
TIA,
Mitch