You need to sign in to do that
Don't have an account?
sforce2009
Could not connect to google apps account for creatin calendar events
Hi
I am using google api toolkit to connect to the google calendar and create events there according to the events created in my salesforce account.
But now, i need to connect to google apps calendar instead of normal gmail which i am doing with this function AuthSubUtil.getRequestPageReference().
How do i do that. please help....
not sure i understand, the calendar stuff is in the class CalendarService.cls
authsub is only for login portion.
can you post some code so show how you login?
did you read the docs for setting up a calendar connection ?
here http://wiki.developerforce.com/index.php/Google_Calendar_API
Hi ron,
thank you for the reply. here are the details
I have done my calendar integration through the below link only (http://wiki.developerforce.com/index.php/Google_Calendar_API )
PLEASE HELP
6. Here our client is having google apps login instead of gmail login.
7. I am struck here how to show this google apps login instead of gmail login.
I don't understand, there is no gdata api for gmail, so when you call the auth url how can you arrive at a gmail login?
are you using google apps or google apps for your domain ?
did you try to construct the auth url and call it directly from a browser ( outside visualforce) , that is how i normally debug this process, paste the url into a browser, capture the response using firebug, then construct the next url, and so on.
what does the login screen from Google look like?
The screen will look like, It will ask for google login on the right side. then it will give the grant access and deny access screen.
This is where we strucked, it accepts the gmail credentials but not the hosted domain's credentials like xxxx@xxxx.org
it will accept my gmail srinivas.d2s@gmail.com. but not like xxx@xxx.com which is a hosted domain.
and one more problem is , i am forwarding emails that are arrived to my gmail account to salesforce emailservice. There i have associated the service to an apex class which will then parse the email subject and updates it to on custom object.
The email arrives to my gmail account and it will forward to any other account except salesforce email service. what would be the issue here.
If you could give your skype Id or any messenger Id It would be of great help to me.
sorry, no idea on that email question
for auth sub for your domain, you will have to modify the library, not sure what this will require as i did not build that out.
here is the article you will need to read.
http://googledataapis.blogspot.com/2008/04/announcing-authentication-proxy-service.html
it should be passing another param to the auth sub URL, which will require modifying AuthSubUtil.
from this page
http://code.google.com/apis/gdata/authsub.html
you can see two different methods of invoking (note this is the Java client lib version)
Since i did not build the second method, you will have to.
in fact you are in luck, this page
http://code.google.com/apis/accounts/docs/AuthSub.html
says that you need to add "hd=yourdomain.com"
see this table
Good luck!
please post back the method if you build it and get it working.
here is what i would try
public static pagereference getRequestPageReference(string hosted_domain, string proto, string host, String nextUrl, String scope) { // first we need to go thru the Salesforce GoogleAuthSub callback servlet // and that (next destination) needs to be encoded string encodedNext = proto + '://' + host + '/_ui/core/google/GoogleAuthSubCallback?url=' + EncodingUtil.urlEncode( nextUrl, 'UTF-8' ); // finaly construct the first step in the redirect process, send your users to this url // must be done by the end user, in a browser... return new PageReference( authRequest + '?next='+ encodedNext + '&hd=' + hosted_domain + '&scope='+ scope + '&session=1&secure=0'); }
Thanks a lot for the help. It worked..... Just a small change i have done...
Instead of
I have taken as because there is no overload for getRequestPageReference with 5 params.
HI Ron, this is not working on Production account. It is simply saying attempt to de reference null object. I just get the
Grant Access page of google when it it returning it is sending 2 tokens in the url and says the above error. any help?
Solution/Update posted at
http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=18241#M18241