locked
using google api

    Question

  • Hi,

    How can I use google feed api in  my metro app which I am creating using javascript/Html.

    regards

    -Lalit

    Tuesday, September 4, 2012 6:14 AM

Answers

  • If there is a google api for JavaScript you would simply include that library code in your project and call the APIs. 

    -Jeff


    Jeff Sanders (MSFT)

    Tuesday, September 4, 2012 7:44 PM
    Moderator
  • Do not use src="http://

    Copy the library locally (into a directory in your project and use it from there: src="folderyoucreatedforgoogleapis/jsapi.js"

    See the google online help for more information to see how they allow you to copy the library local and use it.

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, September 5, 2012 11:33 AM
    Moderator

All replies

  • If there is a google api for JavaScript you would simply include that library code in your project and call the APIs. 

    -Jeff


    Jeff Sanders (MSFT)

    Tuesday, September 4, 2012 7:44 PM
    Moderator
  • HI,

    When I include the following code in my metro app in the head tag . I get the error "google is undefined".

    How should I proceed.

    <script type="text/javascript" src="https://www.google.com/jsapi"></script> 
    
    <script type="text/javascript">  
          google.load("feeds", "1");
        </script>

    -Lalit


    • Edited by LALIT_KUMAR Wednesday, September 5, 2012 11:24 AM
    Wednesday, September 5, 2012 11:23 AM
  • Do not use src="http://

    Copy the library locally (into a directory in your project and use it from there: src="folderyoucreatedforgoogleapis/jsapi.js"

    See the google online help for more information to see how they allow you to copy the library local and use it.

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, September 5, 2012 11:33 AM
    Moderator
  • For Windows 8 apps you would create a local HTML page, let's say you save the example as chartPage.html:

    You can copy an example here:

    And host this page inside an iframe using ms-appx-web:/// protocol to allow the content to run outside of the local content.

    something like this: <iframe src="ms-appx-web:///chartPage.html"></iframe>

    For Windows 8.1 you will need to use the new <x-ms-webview src="ms-appx-web://chartPage.html"></x-ms-webview>

    You will need to adjust the size of your iframe (Windows 8) or x-ms-webview (Windows 8.1).


    Cool beans

    Tuesday, August 27, 2013 5:13 AM