<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>cropperplugins Forum Rss Feed</title><link>http://www.codeplex.com/cropperplugins/Thread/List.aspx</link><description>cropperplugins Forum Rss Description</description><item><title>New Post: Capture also Captures Cropping Window</title><link>http://cropperplugins.codeplex.com/discussions/444337</link><description>&lt;div style="line-height: normal;"&gt;I have tried the options in the options menu. I'm able to turn off the cropping window during recording but then I have to return to the task bar to stop the recording.&lt;br /&gt;
&lt;br /&gt;
Can you help me with this?&lt;br /&gt;
&lt;br /&gt;
Thank you otherwise!&lt;br /&gt;
&lt;/div&gt;</description><author>slbryant</author><pubDate>Mon, 20 May 2013 20:32:57 GMT</pubDate><guid isPermaLink="false">New Post: Capture also Captures Cropping Window 20130520083257P</guid></item><item><title>New Post: A question on output to printer</title><link>http://cropperplugins.codeplex.com/discussions/432503</link><description>&lt;div style="line-height: normal;"&gt;I was wondering if there is anyway to scale the output for output to printer?&lt;br /&gt;
&lt;br /&gt;
I've tried modifying the printer settings but it doesn't seem to work.  It would be helpful if the output were scaled to fit the default paper size of the printer when doing print screen. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'm using cropper with win7 pro 64&lt;br /&gt;
&lt;/div&gt;</description><author>robcastaldo</author><pubDate>Fri, 08 Feb 2013 15:54:17 GMT</pubDate><guid isPermaLink="false">New Post: A question on output to printer 20130208035417P</guid></item><item><title>New Post: Another plugin for Office 365</title><link>http://cropperplugins.codeplex.com/discussions/405797</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hello Friends,&lt;/p&gt;
&lt;p&gt;There is another plugin for Office 365. For this plugin to work you just need your Office 365 ID.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;http://capturepoint.codeplex.com/&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;/div&gt;</description><author>BhanuSingh</author><pubDate>Thu, 06 Dec 2012 11:38:38 GMT</pubDate><guid isPermaLink="false">New Post: Another plugin for Office 365 20121206113838A</guid></item><item><title>New Post: OAuth lib works with image upload API</title><link>http://cropperplugins.codeplex.com/discussions/269906</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Ah, that turned out to be not so difficult, just add:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;font face="Consolas" size="2"&gt;
&lt;p&gt;contents.AppendLine(separator)&lt;/p&gt;
&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;contents.AppendLine(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; color: #a31515; font-size: x-small;"&gt;"Content-Disposition: form-data; name=""in_reply_to_status_id"""&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;) &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;contents.AppendLine()&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;contents.AppendLine(IDofTweetToReplyTo)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #008000; font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; color: #008000; font-size: x-small;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</description><author>robertod</author><pubDate>Wed, 31 Oct 2012 13:47:50 GMT</pubDate><guid isPermaLink="false">New Post: OAuth lib works with image upload API 20121031014750P</guid></item><item><title>New Post: OAuth lib works with image upload API</title><link>http://cropperplugins.codeplex.com/discussions/269906</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Works fantastic, but how can this be used with the in_reply_to_status_id parameter ?&lt;/p&gt;&lt;/div&gt;</description><author>robertod</author><pubDate>Wed, 31 Oct 2012 13:10:07 GMT</pubDate><guid isPermaLink="false">New Post: OAuth lib works with image upload API 20121031011007P</guid></item><item><title>New Post: Plugin "Send to ImageShack" doesn't work anymore</title><link>http://cropperplugins.codeplex.com/discussions/401129</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;ImageShack&amp;nbsp; did some changes on their image submitting mechanism, and so the plugin for uploding to ImageShack doesn't work anymore.&lt;/p&gt;
&lt;/div&gt;</description><author>Get_free</author><pubDate>Mon, 29 Oct 2012 14:47:24 GMT</pubDate><guid isPermaLink="false">New Post: Plugin "Send to ImageShack" doesn't work anymore 20121029024724P</guid></item><item><title>New Post: New Release: v1.3</title><link>http://cropperplugins.codeplex.com/discussions/238033</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Peter - thanks for reporting this and sorry about the error.&lt;/p&gt;
&lt;p&gt;I will need to test that here on my end., and I'll get back to you.&lt;/p&gt;
&lt;p&gt;Will update this thread with info as I am able to diagnose it.&lt;/p&gt;&lt;/div&gt;</description><author>Cheeso</author><pubDate>Thu, 26 Jul 2012 21:10:58 GMT</pubDate><guid isPermaLink="false">New Post: New Release: v1.3 20120726091058P</guid></item><item><title>New Post: New Release: v1.3</title><link>http://cropperplugins.codeplex.com/discussions/238033</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;The facebook plug in doesn't work for me. When I used it the first time I got the usual login to facebook and approval to use the plug in but then I get an empty browser window with the word "Success" and if I close this I get&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;---------------------------No Authorizaiton for Facebook plugin---------------------------&lt;/p&gt;
&lt;p&gt;You must approve Cropper for use with Facebookbefore uploading an image.&lt;br /&gt;&lt;br /&gt;---------------------------OK &amp;nbsp;&amp;nbsp;---------------------------&amp;nbsp;&lt;/p&gt;
&lt;p&gt;No uploads are done.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Peter&lt;/p&gt;&lt;/div&gt;</description><author>PeterNZ</author><pubDate>Wed, 25 Jul 2012 23:24:36 GMT</pubDate><guid isPermaLink="false">New Post: New Release: v1.3 20120725112436P</guid></item><item><title>New Post: Request to separate file format from destination.</title><link>http://cropperplugins.codeplex.com/discussions/269067</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Your observation is spot on, and I think yours sounds like a reasonable request.&amp;nbsp; I noticed the same thing of course, as I reproduced the format selection in various plugins I was maintaining.&amp;nbsp; I also noticed a nice opportunity for the kind of chaining you described, with the send-to-paint plugin.&amp;nbsp; It currently implements its own chaining, to allow the image to get sent to a remote service, after it is finished being edited in Paint.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So I think it's a good idea.&lt;/p&gt;
&lt;p&gt;But, I can't do anything about it.&amp;nbsp; The change you are describing would first require a change to Cropper itself.&amp;nbsp; I am not a contributor for the cropper project; I am a contributor to cropper plugins.&amp;nbsp;&amp;nbsp; I'm more than willing to commit to updating the various plugins here to work with a new plugin model that supports chaining and format independence.&amp;nbsp; I don't know how willing Terry Hughes would be to do the work required in Cropper.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>Cheeso</author><pubDate>Sun, 16 Oct 2011 18:04:26 GMT</pubDate><guid isPermaLink="false">New Post: Request to separate file format from destination. 20111016060426P</guid></item><item><title>New Post: Using OAuth.cs with parameters containing special characters</title><link>http://cropperplugins.codeplex.com/discussions/275206</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Christoffer,&lt;/p&gt;
&lt;p&gt;I am glad to hear that you solved your problem, and you were able to get some use out of Oauth.cs .&lt;/p&gt;
&lt;p&gt;Thanks for letting me know. Good luck.&lt;/p&gt;
&lt;p&gt;-Dino&lt;/p&gt;&lt;/div&gt;</description><author>Cheeso</author><pubDate>Sun, 16 Oct 2011 17:55:48 GMT</pubDate><guid isPermaLink="false">New Post: Using OAuth.cs with parameters containing special characters 20111016055548P</guid></item><item><title>New Post: Using OAuth.cs with parameters containing special characters</title><link>http://cropperplugins.codeplex.com/discussions/275206</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Thank you so much for all your help. It turns out that you were right, the problem is how the stuff is encoded. I did find the encoding method provided by OAuth.cs and in the comments it said that one should use that method instead of the built in one. So I  changed it and used that method to encode my parameters and now it works. All because of the lower/upper case stuff. :)&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;However, I did find that swedish characters (&amp;aring;&amp;auml;&amp;ouml;&amp;Aring;&amp;Auml;&amp;Ouml;) messed things up a bit. If they were encoded (as they should be according to the RFC) then I got an error from the provider but if I just let them be (added them to the unreservedChars string) then it  worked. However, this seem to be a bug in the provider code and not OAuth.cs since the RFC clearly states that &amp;aring;&amp;auml;&amp;ouml; should be encoded.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Thanks for your help! Have a sunny day!
&lt;div&gt;&lt;/div&gt;
/ Christoffer
&lt;div&gt;&lt;br /&gt;
&lt;div&gt;Creator of Stoffi Music Player&lt;/div&gt;
&lt;div&gt;&lt;a href="http://www.stoffiplayer.com" target="_blank"&gt;www.stoffiplayer.com&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;</description><author>ephracis</author><pubDate>Sat, 15 Oct 2011 14:28:38 GMT</pubDate><guid isPermaLink="false">New Post: Using OAuth.cs with parameters containing special characters 20111015022838P</guid></item><item><title>New Post: OAuth lib works with image upload API</title><link>http://cropperplugins.codeplex.com/discussions/269906</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;This code worked for me, uploading an image to Twitter.&lt;/p&gt;
&lt;div style="background-color: white; color: black;"&gt;
&lt;pre&gt;    &lt;span style="color: blue;"&gt;string&lt;/span&gt; twitterUrl1 = &lt;span style="color: #a31515;"&gt;"http://api.twitter.com/1/statuses/update.xml?status="&lt;/span&gt;;
    &lt;span style="color: blue;"&gt;string&lt;/span&gt; twitterUrl2 = &lt;span style="color: #a31515;"&gt;"https://upload.twitter.com/1/statuses/update_with_media.xml"&lt;/span&gt;;

    &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; GetTwitterUpdateUrl()
    {
        &lt;span style="color: blue;"&gt;return&lt;/span&gt; (imageFile == &lt;span style="color: blue;"&gt;null&lt;/span&gt;) ?
            twitterUrl1 + message :  twitterUrl2;
    }

    &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; GetMimeType(String filename)
    {
        &lt;span style="color: blue;"&gt;var&lt;/span&gt; extension = System.IO.Path.GetExtension(filename).ToLower();
        &lt;span style="color: blue;"&gt;var&lt;/span&gt; regKey =  Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(extension);

        &lt;span style="color: blue;"&gt;string&lt;/span&gt; result =
            ((regKey != &lt;span style="color: blue;"&gt;null&lt;/span&gt;) &amp;amp;&amp;amp; (regKey.GetValue(&lt;span style="color: #a31515;"&gt;"Content Type"&lt;/span&gt;) != &lt;span style="color: blue;"&gt;null&lt;/span&gt;))
            ? regKey.GetValue(&lt;span style="color: #a31515;"&gt;"Content Type"&lt;/span&gt;).ToString()
            : &lt;span style="color: #a31515;"&gt;"image/unknown"&lt;/span&gt; ;
        &lt;span style="color: blue;"&gt;return&lt;/span&gt; result;
    }

    &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Tweet()
    {
        &lt;span style="color: blue;"&gt;var&lt;/span&gt; url = GetTwitterUpdateUrl();
        &lt;span style="color: blue;"&gt;var&lt;/span&gt; authzHeader = oauth.GenerateAuthzHeader(url, &lt;span style="color: #a31515;"&gt;"POST"&lt;/span&gt;);
        &lt;span style="color: blue;"&gt;var&lt;/span&gt; request = (HttpWebRequest)WebRequest.Create(url);

        request.Method = &lt;span style="color: #a31515;"&gt;"POST"&lt;/span&gt;;
        request.PreAuthenticate = &lt;span style="color: blue;"&gt;true&lt;/span&gt;;
        request.AllowWriteStreamBuffering = &lt;span style="color: blue;"&gt;true&lt;/span&gt;;
        request.Headers.Add(&lt;span style="color: #a31515;"&gt;"Authorization"&lt;/span&gt;, authzHeader);

        &lt;span style="color: blue;"&gt;if&lt;/span&gt; (imageFile != &lt;span style="color: blue;"&gt;null&lt;/span&gt;)
        {
            &lt;span style="color: blue;"&gt;string&lt;/span&gt; boundary = &lt;span style="color: #a31515;"&gt;"======"&lt;/span&gt; +
                          Guid.NewGuid().ToString().Substring(18).Replace(&lt;span style="color: #a31515;"&gt;"-"&lt;/span&gt;,&lt;span style="color: #a31515;"&gt;""&lt;/span&gt;) +
                          &lt;span style="color: #a31515;"&gt;"======"&lt;/span&gt;;

            &lt;span style="color: blue;"&gt;var&lt;/span&gt; separator = &lt;span style="color: #a31515;"&gt;"--"&lt;/span&gt; + boundary;
            &lt;span style="color: blue;"&gt;var&lt;/span&gt; footer = &lt;span style="color: #a31515;"&gt;"\r\n"&lt;/span&gt; + separator + &lt;span style="color: #a31515;"&gt;"--\r\n"&lt;/span&gt;;

            &lt;span style="color: blue;"&gt;string&lt;/span&gt; shortFileName = Path.GetFileName(imageFile);
            &lt;span style="color: blue;"&gt;string&lt;/span&gt; fileContentType = GetMimeType(shortFileName);
            &lt;span style="color: blue;"&gt;string&lt;/span&gt; fileHeader = &lt;span style="color: blue;"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #a31515;"&gt;"Content-Disposition: file; "&lt;/span&gt; +
                                              &lt;span style="color: #a31515;"&gt;"name=\"media\"; filename=\"{0}\""&lt;/span&gt;,
                                              shortFileName);
            &lt;span style="color: blue;"&gt;var&lt;/span&gt; encoding = System.Text.Encoding.GetEncoding(&lt;span style="color: #a31515;"&gt;"iso-8859-1"&lt;/span&gt;);

            &lt;span style="color: blue;"&gt;var&lt;/span&gt; contents = &lt;span style="color: blue;"&gt;new&lt;/span&gt; System.Text.StringBuilder();
            contents.AppendLine(separator);
            contents.AppendLine(&lt;span style="color: #a31515;"&gt;"Content-Disposition: form-data; name=\"status\""&lt;/span&gt;);
            contents.AppendLine();
            contents.AppendLine(message);
            contents.AppendLine(separator);
            contents.AppendLine(fileHeader);
            contents.AppendLine(&lt;span style="color: blue;"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #a31515;"&gt;"Content-Type: {0}"&lt;/span&gt;, fileContentType));
            contents.AppendLine();

            request.ServicePoint.Expect100Continue = &lt;span style="color: blue;"&gt;false&lt;/span&gt;;
            request.ContentType = &lt;span style="color: #a31515;"&gt;"multipart/form-data; boundary="&lt;/span&gt; + boundary;
            &lt;span style="color: green;"&gt;// actually send the request&lt;/span&gt;
            &lt;span style="color: blue;"&gt;using&lt;/span&gt; (&lt;span style="color: blue;"&gt;var&lt;/span&gt; s = request.GetRequestStream())
            {
                &lt;span style="color: blue;"&gt;byte&lt;/span&gt;[] bytes = encoding.GetBytes(contents.ToString());
                s.Write(bytes, 0, bytes.Length);
                bytes = File.ReadAllBytes(imageFile);
                s.Write(bytes, 0, bytes.Length);
                bytes = encoding.GetBytes(footer);
                s.Write(bytes, 0, bytes.Length);
            }
        }


        &lt;span style="color: blue;"&gt;using&lt;/span&gt; (&lt;span style="color: blue;"&gt;var&lt;/span&gt; response = (HttpWebResponse)request.GetResponse())
        {
            &lt;span style="color: blue;"&gt;if&lt;/span&gt; (response.StatusCode != HttpStatusCode.OK)
                MessageBox.Show(&lt;span style="color: #a31515;"&gt;"There's been a problem trying to tweet:"&lt;/span&gt; +
                                Environment.NewLine +
                                response.StatusDescription +
                                Environment.NewLine +
                                Environment.NewLine +
                                &lt;span style="color: #a31515;"&gt;"You will have to tweet manually."&lt;/span&gt; +
                                Environment.NewLine);
        }
    }

&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;To use it, I created the oauth manager class, and set the message and imageFile fields.&amp;nbsp; like this:&lt;/p&gt;
&lt;div style="background-color: white; color: black;"&gt;
&lt;pre&gt;    oauth = &lt;span style="color: blue;"&gt;new&lt;/span&gt; OAuth.Manager();
    oauth[&lt;span style="color: #a31515;"&gt;"consumer_key"&lt;/span&gt;] = APP_CONSUMER_KEY;
    oauth[&lt;span style="color: #a31515;"&gt;"consumer_secret"&lt;/span&gt;] = APP_CONSUMER_SECRET;
    oauth[&lt;span style="color: #a31515;"&gt;"token"&lt;/span&gt;]           = accessToken;
    oauth[&lt;span style="color: #a31515;"&gt;"token_secret"&lt;/span&gt;]    = accessSecret;
    message = &lt;span style="color: #a31515;"&gt;"This is the twitter status message"&lt;/span&gt;;
    imageFile = &lt;span style="color: #a31515;"&gt;"C:\\users\\Melvin\\Documents\\MyPhoto.jpg"&lt;/span&gt;;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>Cheeso</author><pubDate>Tue, 11 Oct 2011 02:50:57 GMT</pubDate><guid isPermaLink="false">New Post: OAuth lib works with image upload API 20111011025057A</guid></item><item><title>New Post: Using OAuth.cs with parameters containing special characters</title><link>http://cropperplugins.codeplex.com/discussions/275206</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Yes, I just tested this, and it works with Twitter whether the status message is url-encoded before calling GenerateAuthzHeader or not.&lt;/p&gt;
&lt;p&gt;so, the conclusion is, you should look to your provider, as I said before.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>Cheeso</author><pubDate>Tue, 11 Oct 2011 01:03:52 GMT</pubDate><guid isPermaLink="false">New Post: Using OAuth.cs with parameters containing special characters 20111011010352A</guid></item><item><title>New Post: Using OAuth.cs with parameters containing special characters</title><link>http://cropperplugins.codeplex.com/discussions/275206</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I looked again and ran some tests and it seems that the double-encoding should be a non-issue.&amp;nbsp; It gets run through a the System.Uri class which prevents any double-encoding. I think you could safely eliminate any external Url-encoding of the url, before calling GenerateAuthzHeader(), but I think including it (as I have shown in the documentation for that and other methods) also does not cause a problem.&lt;/p&gt;&lt;/div&gt;</description><author>Cheeso</author><pubDate>Mon, 10 Oct 2011 22:41:12 GMT</pubDate><guid isPermaLink="false">New Post: Using OAuth.cs with parameters containing special characters 20111010104112P</guid></item><item><title>New Post: OAuth lib works with image upload API</title><link>http://cropperplugins.codeplex.com/discussions/269906</link><description>&lt;div style="line-height: normal;"&gt;This discussion has been copied to a work item. Click &lt;a href="http://cropperplugins.codeplex.com/workitem/16715"&gt;here&lt;/a&gt; to go to the work item and continue the discussion.&lt;/div&gt;</description><author>Cheeso</author><pubDate>Mon, 10 Oct 2011 22:15:24 GMT</pubDate><guid isPermaLink="false">New Post: OAuth lib works with image upload API 20111010101524P</guid></item><item><title>New Post: OAuth lib works with image upload API</title><link>http://cropperplugins.codeplex.com/discussions/269906</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Thanks for posting this - very good.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Seems like the right thing to do is to create a new plugin for this, and let the existing twitpic plugin remain.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>Cheeso</author><pubDate>Mon, 10 Oct 2011 22:14:39 GMT</pubDate><guid isPermaLink="false">New Post: OAuth lib works with image upload API 20111010101439P</guid></item><item><title>New Post: Using OAuth.cs with parameters containing special characters</title><link>http://cropperplugins.codeplex.com/discussions/275206</link><description>&lt;div style="line-height: normal;"&gt;&lt;div style="width: 680px;"&gt;
&lt;p&gt;I don't know, but the obvious place to look is in the Url Encoding.&lt;/p&gt;
&lt;p&gt;When connecting to Twitter, the Oauth.cs code works correctly as it is.&amp;nbsp; I've tested it and it works.&amp;nbsp; But this could be provider-specific. In other words there could be some flexibility that is built in to Twitter that is not&amp;nbsp;present in your provider.&lt;/p&gt;
&lt;p&gt;I cannot remember what the "specification" said about url-encoding the URL before generating the authorization header.&amp;nbsp; So I looked.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://dev.twitter.com/docs/auth/oauth"&gt;OAuth 1.0a spec&lt;/a&gt; says:&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;The signature base string is often the most difficult part of OAuth for newcomers to construct. The signature base string is composed of the HTTP method being used, followed by an ampersand ("&amp;amp;") and then the URL-encoded base URL being accessed, complete with path (but not query parameters), followed by ....&lt;/p&gt;
&lt;p&gt;....It goes on in some additional detail about how to create the signature base string.&lt;/p&gt;
&lt;p&gt;Looking in the code I wrote for OAuth.cs, the GenerateAuthzHeader does Url-encode the URL before signing it.&amp;nbsp;&amp;nbsp; But I see you have url-encoded the url before passing it to GenerateAuthzHeader().&amp;nbsp; (This is actually how I do it when interacting with Twitter, and it's also the way the documentation for OAuth.cs shows to do it)&amp;nbsp;&amp;nbsp; This would mean the URL gets url-encoded twice, which would be redundant of course.&amp;nbsp; &amp;nbsp;It could be that Twitter's provider is flexible enough to tolerate the double-pass, and your provider is not. If that is the case, you could test by simply not url-encoding before calling GenerateAuthzHeader().&lt;/p&gt;
&lt;p&gt;If that simple test does not work, I'd suggest that you look at where the failure is generated on the server side, in the provider, and trace it back.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</description><author>Cheeso</author><pubDate>Mon, 10 Oct 2011 22:12:24 GMT</pubDate><guid isPermaLink="false">New Post: Using OAuth.cs with parameters containing special characters 20111010101224P</guid></item><item><title>New Post: Using OAuth.cs with parameters containing special characters</title><link>http://cropperplugins.codeplex.com/discussions/275206</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am using the OAuth.cs file to send requests as a consumer in my C# application. I love the simplicity of it but today I stumbled upon a problem. I want to send some parameters along with my request. So I do it like this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var&lt;/span&gt; url = &lt;span style="color:#a31515"&gt;&amp;quot;http://www.domain.com/some/path?foo=&amp;quot;&lt;/span&gt; &amp;#43; HttpUtility.UrlEncode(&lt;span style="color:#a31515"&gt;&amp;quot;using space&amp;quot;&lt;/span&gt;);
&lt;span style="color:blue"&gt;var&lt;/span&gt; authzHeader = oauth.GenerateAuthzHeader(url, &lt;span style="color:#a31515"&gt;&amp;quot;POST&amp;quot;&lt;/span&gt;);
&lt;span style="color:blue"&gt;var&lt;/span&gt; request = (HttpWebRequest)WebRequest.Create(url);
request.Method = &lt;span style="color:#a31515"&gt;&amp;quot;POST&amp;quot;&lt;/span&gt;;
request.PreAuthenticate = &lt;span style="color:blue"&gt;true&lt;/span&gt;;
request.AllowWriteStreamBuffering = &lt;span style="color:blue"&gt;true&lt;/span&gt;;
request.Headers.Add(&lt;span style="color:#a31515"&gt;&amp;quot;Authorization&amp;quot;&lt;/span&gt;, authzHeader);
&lt;span style="color:blue"&gt;try&lt;/span&gt;
{
	&lt;span style="color:blue"&gt;using&lt;/span&gt; (&lt;span style="color:blue"&gt;var&lt;/span&gt; response = (HttpWebResponse)request.GetResponse())
	{
		&lt;span style="color:blue"&gt;if&lt;/span&gt; (response.StatusCode != HttpStatusCode.OK)
			Console.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;Error!&amp;quot;&lt;/span&gt;);
		&lt;span style="color:blue"&gt;else&lt;/span&gt;
		{
			Stream s = response.GetResponseStream();
			StreamReader sr = &lt;span style="color:blue"&gt;new&lt;/span&gt; StreamReader(s);
			&lt;span style="color:blue"&gt;string&lt;/span&gt; str = sr.ReadToEnd();
			U.L(LogLevel.Information, &lt;span style="color:#a31515"&gt;&amp;quot;SERVICE&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515"&gt;&amp;quot;Shared song, got response: &amp;quot;&lt;/span&gt; &amp;#43; str);
		}
	}
}
&lt;span style="color:blue"&gt;catch&lt;/span&gt; (WebException exc)
{
	U.L(LogLevel.Error, &lt;span style="color:#a31515"&gt;&amp;quot;SERVICE&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515"&gt;&amp;quot;Error while trying to share song: &amp;quot;&lt;/span&gt; &amp;#43; exc.Message);
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Problem is, this seems to make the provider throw me off to the login page, probably because there's something wrong with the signature. The provider is setup following these instructions:&amp;nbsp;&lt;a href="http://stakeventures.com/articles/2007/11/26/how-to-turn-your-rails-site-into-an-oauth-provider"&gt;http://stakeventures.com/articles/2007/11/26/how-to-turn-your-rails-site-into-an-oauth-provider&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have tried with some different parameters and as long as it's just a-z 0-1 it works. But if I try something like space, colon, slash or any other character that needs to be encoded I'm screwed.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So am I doing something wrong in the C# code, is there some bug in the OAuth.cs file (I couldn't find anything) or is it the provider that's behaving strangely?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;/div&gt;</description><author>ephracis</author><pubDate>Sat, 08 Oct 2011 17:52:10 GMT</pubDate><guid isPermaLink="false">New Post: Using OAuth.cs with parameters containing special characters 20111008055210P</guid></item><item><title>New Post: OAuth lib works with image upload API</title><link>http://cropperplugins.codeplex.com/discussions/269906</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Twitter now has an API for uploading images direct to twitter: https://dev.twitter.com/docs/api/1/post/statuses/update_with_media&lt;/p&gt;
&lt;p&gt;Something you might want to consider using from the cropper plugins?&lt;/p&gt;
&lt;p&gt;I've got it going with the OAuth lib.&amp;nbsp; I'm using the Upload.PostFile from
&lt;a href="http://www.codeproject.com/Articles/72232/C-File-Upload-with-form-fields-cookies-and-headers/?display=Mobile"&gt;
Salient&lt;/a&gt; as the System.Net.WebClient won't allow me to name the file's form variable.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;OAuth.Manager man = &lt;span style="color:blue"&gt;new&lt;/span&gt; OAuth.Manager(CONSUMER_KEY, CONSUMER_SECRET, token, secret);
&lt;span style="color:blue"&gt;string&lt;/span&gt; url = &lt;span style="color:#a31515"&gt;&amp;quot;https://upload.twitter.com/1/statuses/update_with_media.xml?&amp;quot;&lt;/span&gt;&amp;#43;
    &lt;span style="color:#a31515"&gt;&amp;quot;status=&amp;quot;&lt;/span&gt; &amp;#43; OAuth.Manager.UrlEncode(&lt;span style="color:#a31515"&gt;&amp;quot;setting up my twitter &amp;amp;#31169;!!&amp;quot;&lt;/span&gt;
    );
&lt;span style="color:blue"&gt;string&lt;/span&gt; header = man.GenerateAuthzHeader(url, &lt;span style="color:#a31515"&gt;&amp;quot;POST&amp;quot;&lt;/span&gt;);

NameValueCollection headers = &lt;span style="color:blue"&gt;new&lt;/span&gt; NameValueCollection();
headers.Add(&lt;span style="color:#a31515"&gt;&amp;quot;Authorization&amp;quot;&lt;/span&gt;, header);
            
WebResponse fileResponse = Upload.PostFile(&lt;span style="color:blue"&gt;new&lt;/span&gt; Uri(url)
    , &lt;span style="color:blue"&gt;new&lt;/span&gt; NameValueCollection()
    , &lt;span style="color:#a31515"&gt;@&amp;quot;C:\Users\Russ\4063b622-4716-4c19-9050-c7cf8f9f7ec2.jpg&amp;quot;&lt;/span&gt;
    , &lt;span style="color:#a31515"&gt;&amp;quot;img/jpeg&amp;quot;&lt;/span&gt;
    , &lt;span style="color:#a31515"&gt;&amp;quot;media[]&amp;quot;&lt;/span&gt;
    , &lt;span style="color:blue"&gt;null&lt;/span&gt;
    , headers);


Stream s = fileResponse.GetResponseStream();
&lt;span style="color:blue"&gt;using&lt;/span&gt; (StreamReader sr = &lt;span style="color:blue"&gt;new&lt;/span&gt; StreamReader(s))
{
    &lt;span style="color:blue"&gt;string&lt;/span&gt; res = sr.ReadToEnd();
    Console.Write(res);
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;</description><author>russau</author><pubDate>Mon, 22 Aug 2011 07:08:34 GMT</pubDate><guid isPermaLink="false">New Post: OAuth lib works with image upload API 20110822070834A</guid></item><item><title>New Post: Request to separate file format from destination.</title><link>http://cropperplugins.codeplex.com/discussions/269067</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Love cropper. This request is to separate the selected file format from the selected &amp;quot;destination.&amp;quot; That is, for plug-ins such as SendToEmail, SendToWherever, let the plug-in use a selected format, independent of selecting that plug-in. e.g., SendToEmail
 has a separate selection for the file format, that doesn't contain .gif (because that's a separate plug-in). (Even without the .gif plug-in issue, the built-in formats don't sync with the plug-in's options.) It's as if these plug-ins are having to take over
 and repeat functionality elsewhere in cropper.&lt;/p&gt;
&lt;p&gt;Perhaps this could be done with explicit &amp;quot;knowledge&amp;quot; of a format vs a destination.&amp;nbsp;Alternatively, maybe this is describing a more generic chained plug-in approach. Run the .jpg output (or .gif plug-in), then run the SendTo... plug-in.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Related to:&amp;nbsp;&lt;a href="http://cropper.codeplex.com/discussions/234102?ProjectName=cropper"&gt;http://cropper.codeplex.com/discussions/234102?ProjectName=cropper&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://cropper.codeplex.com/workitem/14665"&gt;http://cropper.codeplex.com/workitem/14665&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Bob&lt;/p&gt;
&lt;/div&gt;</description><author>goodeye</author><pubDate>Mon, 15 Aug 2011 00:16:49 GMT</pubDate><guid isPermaLink="false">New Post: Request to separate file format from destination. 20110815121649A</guid></item></channel></rss>