开发者

Google Calendar event buttons -- Mobile version

开发者 https://www.devze.com 2023-03-09 16:09 出处:网络
I\'ve created a mobile site that displays events retrieved from a Google Calendar. I would like to display a button on each event that allows the user to add the event to their own Google Calendar.

I've created a mobile site that displays events retrieved from a Google Calendar. I would like to display a button on each event that allows the user to add the event to their own Google Calendar.

Google Calendar provides a simple way to do this with HTML snippets: (http://www.google.com/googlecalendar/event_publisher_guide_detail.html)

The url takes parameters so that you can populate the add event form. Here's an example: https://www.google.com/calendar/render?action=TEMPLATE&text=Brunch+at+Java+Cafe&dates=20060415T180000Z/20060415T1开发者_StackOverflow90000Z&location=Java+Cafe,+San+Francisco,+CA&details=Try+our+Saturday+brunch+special:%3Cbr%3E%3Cbr%3EFrench+toast+with+fresh+fruit%3Cbr%3E%3Cbr%3EYum!&trp;=true&sprop;=+website:http://www.javacafebrunches.com&sprop;=name:Jave+Cafe&gsessionid=OK&sf=true&output=xml

Unfortunately I can't find a mobile equivalent of this page. If you go to the page with Android, it asks if you want to use the mobile version, but because there isn't one, it repeatedly displays the dialog until you finally cancel the dialog.

Does anyone know of a mobile version of this page, or suggest another way to do it? (Ideally without AJAX as it's causing some offline caching issues on iPhone in app mode).


I've been doing some research on this myself and I've come close, but I'm not 100% there yet. Here's a sample URL of a mobile "share event" link:

http://www.google.com/calendar/gp#~calendar:view=e&bm=1&action=TEMPLATE&text=Halloween+Party+2011&dates=20111101/20111202&details=Description&location=Millennial+Media&trp=false

It opens up the mobile version of Google Calendar and pre-populates it with details about the event your sharing.

The only problem I've encountered is when you're not already logged into Google Calendar. It takes you to the log in page, which is fine, but then after you log in it takes you to the home screen instead of the event entry page.

If you find or already found an answer to this, let me know.

~ TJ

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号