Send POST parameters with gmail inbox - GO TO ACTIONS? - google-schemas

Is it possible to send POST parameters with GMAIL GO-TO ACTIONS with specified url?
If yes, how to send and capture those parameters on landing page?
I was working with "Track pakage" button with GMAIL-INBOX ACTIONS.

You can add the parameters you need to the endpoint url, but it is not possible to add a custom request body.

Related

Rails, send data to a facebook app and get this data on my app

I know that I need to use the data like this, in order to send data to my facebook canvas app:
FB.init({appId: '#{Facebook::APP_ID}', xfbml: true, cookie: true});
FB.ui({ method: 'apprequests', message: 'Invite Friends to Blabloo...',
data: '{\"draw_token\":\"#{#draw.token}\",\"invitation_token\":\"#{current_kid.invitation_token}\"}',
exclude_ids: #{#draw.get_invited_ids_for current_kid}},handle_fb_callback);
and this send a Facebook invitation, that show you my registration form inside a cavas Facebook app, now on this registration form, on my new action, I need to get this draw_token and invitation_token.
How can I get this information?
NOTE: I'm using the koala gem
This data field that you sent is specific for that request you send to the user.
Here are the steps to follow to work with this:
When the recipient clicks the requests and redirected to your application with the request_ids parameter, you should then get the data for the requests.
To get the requests from the user, make the call-
{user-id}/apprequests
You will get a list of the requests and the data for each one (if any).
The requests are accumulated and of-course cannot disappear by itself, so you need to delete the request once the user has accepted. To delete a request, make the call-
/{request-id}?method=delete
You can see this example from the developers site.

GET data with Google+ share button

I want to use the Google+ share button in a HTML email. I put the hyperlink
https://plus.google.com/share?url={URL}
into the email.
But when I try the hyperlink there is a problem with the GET-data. If I put ?parameter=name into the URL, Google+ doesn't take it.
How can I send the right URL?
Per the documentation, the url value must be url encoded.
E.g. http://example.com/?foo=bar should be http%3A%2F%2Fexample.com%2F%3Ffoo%3Dbar
https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2F%3Ffoo%3Dbar
In JavaScript you can use encodeURIComponent('http://example.com/?foo=bar')

Restrict access to url sent with Rails ActionMailer to recipient only

I've got a url I am sending users through ActionMailer. The person receiving the email is not a registered user. I want to restrict access to that certain url so only someone getting to it from the link in the mail can access it.
Is there a known way to do that?
One thought i had was to add a token parameter to the url and validate against it when trying to open the link.
Any better ideas? Thanks!

Passing Parameters to facebook callback

I have an app written in Asp.Net MVC and Jquery. The app has a functionality to post a message to facebook wall.
When the user clicks the post button on my custom dialog, i do a redirect to
"https://www.facebook.com/dialog/oauth?client_id=xxxx&display=popup&redirect_uri=http://localhost:xxxx/Posts/AuthorizeFaceBook&scope=publish_stream"
using Jquery. And once the user completes log in to facebook my callback is getting executed without any issues. But how can i pass my Post message to the call back from the original custom dialog?
Is storing the message string in a Session, is the only to way to access the message from the callback ?
Thanks !
You need to include the parameters in your redirect URL. You must also uri encode the redirect URL.

ASP.NET MVC: Triggering an action before posting to Paypal payment gateway

I'm in the middle of developing an e-commerce site that is using Paypal as it's payment gateway. All I want to do is run some code before the user heads off to Paypal to pay for their order, but I have no idea how to do it.
The user should click a submit button, changes are made (in this case, the status of the order), and then the user is redirected to the payment gateway. Eg:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult GoToPaypal(FormCollection collection)
{
//change order status
//send user to paypal where they pay for their order
}
So my question is how do you do application stuff and then redirect to paypal's payment gateway? Example HTML and C# would be lovely :)
Note: This guy seems to have the same issue - (and probably explains it better).
You could POST to paypal from your action method but it will be difficult to show the user the response. In addition, you want to take the users to the paypal website without using a GET request (GET exposes the parameters in the url string and Paypal probably does not accept a GET request).
From what I understand, you have a form with some fields that posts to PayPal. Before the form is posted to Paypal, you want to capture the fields on the form, do some processing with it and then let them post to paypal.
One way of doing this is with jQuery. You wireup the submit event
http://api.jquery.com/submit/
When submit is clicked, in the event handler for the submit you created above, make an ajax call with the form fields you need to your MVC action.
http://api.jquery.com/jQuery.post/
Do the processing and send back a response.
When the page receives the ajax response, change form fields if required that are received from the ajax response.
Finally Use jQuery to submit the form.
==
You mean redirect to paypal, after you're done doing what you want to do?
// run some code
//
// go to paypal
return RedirectResult("http://paypal.com/blah");

Resources