When I submit a form using method "POST" and full canvas callback Url action inside Facebook iframe canvas, I cannot get the form elements in the request.
Can anyone give me some help on this?
page code:
<form action="http://apps.facebook.com/myapp" method="post" target="_top">
<input type="hidden" name="myvar" value="v" />
<input type="submit" />
</form>
If i understood your question i think that
you are in an IFRAME... so why use a facebook url for the action?
simply put in the action parameter the url of your web application (not the facebook url, but the url of the canvas) something like http://www.yourhost.it/your_fb_app/process.php/aspx
hope this help (and hope to have understood your problem)
Related
I'm starting to get my Facebook integration working on my own app but I'm still strugling with one part:
create a callback URL of redirect URL after a successful video post on my facebook wall trough:
<form enctype="multipart/form-data" action="https://graph-video.facebook.com/v2.9/me/videos?source={{video_source}}&access_token={{access_token}}="POST">
<input name="file" type="file" value="">
<input type="submit" value="Upload" />
</form>
Does anyone know how to do this. So after a successfull upload redirect to a page in my app.
Thanks for helping me out.
I'm using ASP.NET web forms and i need to post data to an iframe, the problem is that in web forms I have the main form tag(form1), so i need another form tag(form2), to post data to the iframe that is in the main form1.
Basically i have this:
<form method="post" id="form2" action="http://localhost:58903/WebForm1.aspx" target="webApp">
<input type="hidden" name="ValidationUserName" value="david" />
<input type="hidden" name="ValidationTokenId" value="13123132132" />
<button type="submit">Send info to inner iframe</button>
</form>
<form id="form1" runat="server">
<iframe id="webApp" name="webApp" src="http://localhost:58903/WebForm1.aspx" style="width: 800px; height: 800px;"></iframe>
</form>
With this approach in open a new tab, if i put the iframe outside it works ok, but if i do this the layout is changed and i don't want this.
Is this possible?
If all the forms are in the same domain you should not work with iframes.
What exactly are you trying to get here? didn't realize completely
Done it, it was missing the "name" attribute in the <form> tags.
I would like to know how to show a CQ5 page in a Facebook App without writing a dedicated sling servlet?
Facebook adds a form post to retrieve markup and insert into the iFrame.
Apparently, CQ5 pages doesn't allow POST operations unless you write a dedicated sling servlet to handle.
The page for some reason sits within /content/dam
Here's what the Facebook App add in the canvas:
<form action="<url>" method="post" target="iframe_canvas_fb_https" id="canvas_iframe_post_522050a15f2c72f17540952" onsubmit="return window.Event && Event.__inlineSubmit && Event.__inlineSubmit(this,event)"><input type="hidden" autocomplete="off" name="signed_request" value="TKQ-UKDi8meFDQgQaq_5c3LWD2R06EiibRdrTk7XldE.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTM3Nzg0OTUwNSwidXNlciI6eyJjb3VudHJ5IjoiaGsiLCJsb2NhbGUiOiJlbl9HQiIsImFnZSI6eyJtaW4iOjIxfX19"><input type="hidden" autocomplete="off" name="locale" value="en_GB"></form>
<iframe class="smart_sizing_iframe" frameborder="0" scrolling="yes" id="iframe_canvas" name="iframe_canvas_fb_https" src='javascript:""' height="800" webkitallowfullscreen="" mozallowfullscreen="" oallowfullscreen="" msallowfullscreen="" style="height: 232px;"></iframe>
In my phonegap webapp, I have a form with some serious GET action on it. When I click submit, I want to open a new page and extract the form data from the URL with javascript.
Question: can you do that in a phonegap app, when you're not actually in a browser?
Yes, you can! It's as simple as I said:
<form action="destinationpage.html" action="GET>
Input your data:<input type="text" name="data /> <br />
<input type="submit" value ="Continue">
</form>
Then see the answer to this question for retrieving your data on the next page!
I just added a FBML application to my fan page but I can't make JS to work ... though I read the FBJS best practices ... I guess I am missing something.
here is the current code :
<form action="" method="post" target="_blank">
<input type="text" name="email" id="emailInput" onclick="document.getElementById(‘emailInput’).setTextValue(‘Hi!’);" value="votre adresse email" alt="Entrez votre email" />
<input type="hidden" name="place" value="facebook" />
<br/>
<input type="submit" name="submit" class="submitInput" value="" alt="Valider" />
</form>
The onclick event seems not to work but I can't get any answers from my research over Internet ...
Any help welcome ;)
Cheers guys.
Gotye.
Use Firebug or Chrome tools to verify that the id is actually emailInput, and that the Facebook FBML parser didn't append a prefix to the ID. But FBML pages have been deprecated so you will be better off switching to an iframe fan page so you aren't running the risk of having Facebook kill your FBML fan page. Also, javascript is a ton easier in iframe pages and can be called without having to wait for a click event to fire.