Recent activity
Subscribe to this feed
Gaurav Gupta replied on November 20, 2009 05:20 to the question "SlideShare LinkedIn Problem" in SlideShare:
Gaurav Gupta replied on April 17, 2008 10:31 to the problem "INVALID API VALIDATION ERROR" in SlideShare:
Gaurav Gupta replied on April 16, 2008 05:56 to the problem "INVALID API VALIDATION ERROR" in SlideShare:
Try this code. It works. Paste it into a simple HTML file and open it in your browser. Remember that when uploading files, the enctype='multipart/form-data' is required.
<form>
<input name="api_key" type="hidden" value="api_key" />
<input name="ts" type="hidden" value="ts" />
<input name="hash" type="hidden" value="hash_for_above_ts" />
<input name="username" type="hidden" value="username" />
<input name="password" type="hidden" value="password" />
<input name="slideshow_title" type="hidden" value="Whatever title" />
<input name="slideshow_srcfile" type="file" />
<input type="submit" value="Submit" />
</form>
In the form tag, use the following parameters:
action="http://www.slideshare.net/api/1/upload_slideshow"
method="post"
enctype='multipart/form-data'
Gaurav Gupta replied on April 16, 2008 05:55 to the problem "cant get upload to work - am i stupid?" in SlideShare:
Gaurav Gupta set one of Gaurav Gupta's replies as an official response to "cant get upload to work - am i stupid?" in SlideShare
Gaurav Gupta replied on April 16, 2008 05:52 to the problem "cant get upload to work - am i stupid?" in SlideShare:
Try this code. It works. Paste it into a simple HTML file and open it in your browser. Remember that when uploading files, the enctype='multipart/form-data' is required.
<form>
<input name="api_key" type="hidden" value="api_key" />
<input name="ts" type="hidden" value="ts" />
<input name="hash" type="hidden" value="hash_for_above_ts" />
<input name="username" type="hidden" value="username" />
<input name="password" type="hidden" value="password" />
<input name="slideshow_title" type="hidden" value="Whatever title" />
<input name="slideshow_srcfile" type="file" />
<input type="submit" value="Submit" />
</form>
Gaurav Gupta set one of Gaurav Gupta's replies as an official response to "Why can't I see slideshows on the SlideShare site?" in SlideShare
Gaurav Gupta replied on March 25, 2008 05:06 to the problem "Why can't I see slideshows on the SlideShare site?" in SlideShare:
Hi Peta,
Can you please open this page in Internet Explorer and tell us which version of the Flash plugin you have installed:
http://kb.adobe.com/selfservice/viewC...
Gaurav Gupta
Gaurav Gupta replied on March 20, 2008 11:05 to the problem "API problem" in SlideShare:
Hi Michael,
I am Gaurav from Slideshare. We received your code through the feedback mail you sent. The problem is in the SHA1 hash calculation you are doing. The method you are using does not result in a correct hash calculation.
Calculate SHA1 like it's done in this sample code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Net;
using System.Xml;
using System.Web;
using System.Security.Cryptography;
namespace ConsoleApplication1
{
class Program
{
public static string CalculateSHA1(string text, Encoding enc)
{
byte[] buffer = enc.GetBytes(text);
SHA1CryptoServiceProvider cryptoTransformSHA1 =
new SHA1CryptoServiceProvider();
string hash = BitConverter.ToString(
cryptoTransformSHA1.ComputeHash(buffer)).Replace("-", "").ToLower();
return hash;
}
public static void getapi(String api_key,String shared_secret,String tags)
{
string timestamp = Convert.ToInt32(Math.Floor((DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0)).TotalSeconds)).ToString();
Console.Write("Timestamp:" + timestamp + "\n");
string lcUrl = "http://www.slideshare.net/api/1/get_slideshow_by_tag?api_key=" + api_key + "&ts=" + timestamp + "&hash=" + CalculateSHA1(shared_secret + timestamp, Encoding.UTF8) + "&tag=" + tags;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(lcUrl);
request.Method = "GET";
HttpWebResponse loWebResponse = (HttpWebResponse)request.GetResponse();
Encoding enc = Encoding.GetEncoding(1252);
StreamReader loResponseStream = new StreamReader(loWebResponse.GetResponseStream(), enc);
string lcHtml = loResponseStream.ReadToEnd();
Console.Write(lcHtml);
loWebResponse.Close();
loResponseStream.Close();
}
static void Main(string[] args)
{
getapi("api_key","shared_secret","tag");
}
}
}
Hope this helps. Please feel free to write back to us incase of any more questions.
Gaurav Gupta asked a question in TechAlerts on February 27, 2008 04:48:
How do you like the TechAlerts service?Please send us your feedback, suggestions, complaints and anything else you would want us to know about TechAlerts. We care about all our subscribers, including our SMS, RSS, Twitter and e-mail subscribers, and all your feedback messages would be given utmost consideration.
Loading Profile...


