Well, like I said, I haven't worked with the FB api yet, and I don't know what your script is designed for. However, it appears that you are connecting just fine but its not throwing anything back that clearly indicates a malformed request. I typically expect to get back a string, xml, jason, or some name-value pairs. Unfortunately, you may have to go with Olin's suggestion. Last I looked at the FB api docs, they've been pushing an all Javascript method. My hunch is that you don't need to be POSTing this at all, but maybe opening a popup or something with javascript. I did something similar to this with Google Calendar. It seems that I generated a url that opened in a javascript popup. The user was supposed to provide their authentication to access their calendar, then it would redirect to a page that just contained a token. From there, I used JS to grab the token, close the popup, and then use that in my TCP requests.Also, I'm not sure about OAUTH v1, but I know you can do all the proper authentication with the OAUTH v2 in WebDNA.On Jan 19, 2012, at 5:40 PM, Dave Stengel wrote:
Aaron,Your code produces the following [callresponse] (facebook's webpage html?):___________________________________________________________________________<html><head><title>Redirecting...</title><script>window._incorporate_fragment= true;</script><script type="text/javascript">functionincorporate_fragment(a){varc=/^(?:(?:[^:\/?#]+):)?(?:\/\/(?:[^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/;varb='';a.href.replace(c,function(d,g,h,f){vare,i;e=i=g+(h?'?'+h:'');if(f){f=f.replace(/^(!|%21)/,'');if(f.charAt(0)=='/')e=f.replace(/^\/+/,'/');}if(e!=i){if(window._script_path)document.cookie="rdir="+window._script_path+";path=/; domain="+window.location.hostname.replace(/^.*(\.facebook\..*)$/i,'$1');window.location.replace(b+e);}});}if(window._incorporate_fragment)incorporate_fragment(window.location);</script><script type="text/javascript">/*<![CDATA[*/functionsi_cj(m){setTimeout(function(){newImage().src="https:\/\/error.facebook.com\/common\/scribe_endpoint.php?c=si_clickjacking&t=7277"+"&m="+m;},5000);}if(top!=self&& !false){try{if(parent!=top){throw 1;}varsi_cj_d=["apps.facebook.com","\/pages\/","apps.beta.facebook.com"];varhref=top.location.href.toLowerCase();for(vari=0;i<si_cj_d.length;i++){if (href.indexOf(si_cj_d[i])>=0){throw1;}}si_cj("3 ");}catch(e){si_cj("1\t");window.document.write("\u003cstyle>body * {display:none!important;}\u003c\/style>\u003ca href=\"#\"onclick=\"top.location.href=window.location.href\"style=\"display:block !important;padding:10px\">\u003ci class=\"imgsp_7iqywk sx_be6a6e\" style=\"display:block !important\">\u003c\/i>Goto Facebook.com\u003c\/a>");/*P5QcPr30*/}}/*]]>*/</script><script>window.location.replace("http:\/\/www.facebook.com\/common\/browser.php");</script><metahttp-equiv="refresh"content="0;url=http://www.facebook.com/common/browser.php"/></head><body></body></html>___________________________________________________________________________This is returned when I add www to connectHOST. call response is blankwithout wwwDave___________________________________________________________________________On Thu, Jan 19, 2012 at 2:15 PM, <aaronmichaelmusic@gmail.com> wrote:
BTW - I don't know if you're already doing this with your testing, but putyour TCP script inside of a text variable and reveal it inside of a<textarea> and possibly even remove the 'skipheaders=T' option. That'llhelp you see exactly what you're getting back from the server. If you copyand paste the response here on the talklist, that'll be a lot more helpfulfor troubleshooting.On Jan 19, 2012, at 5:04 PM, Daniel Meola wrote:port=443&ssl=t sounds right, we use that in our PayPal code. I'm afraid Idon't have any experience with the Facebook API and don't have access totest it. Generally with TCPConnect it takes me a lot of trial and error.Hopefully somebody else with Facebook experience can chime in.Good luck,Daniel Meola301-486-0901daniel@knifecenter.comOn Thu, Jan 19, 2012 at 4:49 PM, Dave Stengel <dave@mobilinkpro.com> wrote:
Thanks for the quick reply. I get an error unable to connect tofacebook. Could this be because the URL is https: ? I addedport=443&ssl=t and gt the following error:Error: couldn't connect to host [https://www.facebook.com]Dave____________________On Thu, Jan 19, 2012 at 1:24 PM, Daniel Meola <daniel@knifecenter.com>wrote:
Try this:[tcpconnect host=www.facebook.com&port=80][tcpsend]POST /dialog/oauth?client_id=[MyID]&redirect_uri=[MyReturnURL]&scope=email,read_stream HTTP/1.0[unurl]%0D%0A%0D%0A[/unurl][/tcpsend][/tcpconnect]Hope it helps,Daniel Meola301-486-0901daniel@knifecenter.comOn Thu, Jan 19, 2012 at 4:20 PM, Dave Stengel <dave@mobilinkpro.com>wrote:
Can anyone help me with a http post issue. I've never done this beforebut I'm trying to post:https://www.facebook.com/dialog/oauth?client_id=[MyID]&redirect_uri=[MyReturnURL]&scope=email,read_streamas webdna code and I'm not sure were to start. Would I use TCPCONNECTto do this. Any direction would be appreciated.Dave---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us>archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us
--------------------------------------------------------- This messageissent to you because you are subscribed to the mailing list . Tounsubscribe,E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us BugReporting: support@webdna.us
--Dave Stengelhttp://www.mobilinksoftware.com209.820.1300dave@mobilinkpro.com---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us>archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us
--------------------------------------------------------- This message issent to you because you are subscribed to the mailing list . To unsubscribe,E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us BugReporting: support@webdna.us--------------------------------------------------------- This message issent to you because you are subscribed to the mailing list . To unsubscribe,E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us BugReporting: support@webdna.us
-- Dave Stengelhttp://www.mobilinksoftware.com209.820.1300dave@mobilinkpro.com---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us>archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us
---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us>archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us
--------------060708080408060603080001--
Associated Messages, from the most recent to the oldest: