

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
1 message in com.googlegroups.google-finance-apis[Google Finance APIs] How to Implemen...| From | Sent On | Attachments |
|---|---|---|
| cmle...@gmail.com | Mar 18, 2009 9:02 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [Google Finance APIs] How to Implement Google Finance on our website? | Actions... |
|---|---|---|
| From: | cmle...@gmail.com (cmle...@gmail.com) | |
| Date: | Mar 18, 2009 9:02:39 pm | |
| List: | com.googlegroups.google-finance-apis | |
We're having problems trying to Implement the Google Finance on our Intranet. It looks like there's authentication issues. Can someone please check the code below or guide me on what to do?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/
<title>My Google Data API Application</title> <script src="http://www.google.com/jsapi? key=ABQIAAAAHIcD0Ed1pJ31cegsYihAfhRrJiujAxTigVe5uTTZU_MlHIHFZhRwxhw_9KNXsFEv- UkXDGwJApe-iA" type="text/javascript"></script>
<script type="text/javascript">
google.setOnLoadCallback(getMyFeed); //tell the loader to wait until the page finishes loading and then call code google.load("gdata", "1");
function logMeIn() { scope = 'http://finance.google.com/finance/feeds/'; var token = google.accounts.user.login(scope); }
function getMyFeed() { // Google Finance Portfolio Data API Example: Retrieve Positions
var financeService = new google.gdata.finance.FinanceService ('GoogleInc-financejsguide-1.0'); logMeIn(); // Note that in this example, we specify a specific portfolio. Alternatively, we // could have retrieved the user's portfolio feed and searched for a particular // portfolio by title as in the preceeding example, if portfolio ID were unknown
var portfolio_id = 1; var portfolioFeedUri = 'http://finance.google.com/finance/feeds/ default/' + 'portfolios/' + portfolio_id + '/positions';
document.write(portfolioFeedUri); //= http://finance.google.com/finance/feeds/default/portfolios/1/positions // Google Finance Portfolio Data API Example: Retrieve Positions
// This callback will run when the position feed query is complete var positionFeedCallback = function(result) { document.write('Retrieved position feed for portfolio #' + portfolio_id + ':'); // An array with all of a portfolio's positions var entries = result.feed.entry; for (var i = 0; i < entries.length; i++) { var positionEntry = entries[i]; var positionData = entries[i].getPositionData(); document.write(positionEntry.getTitle().getText() + ' shares: ' + positionData.getShares()); } if (entries.length == 0) PRINT('No positions!');
};
// FinanceService methods may be supplied with an alternate callback for errors var handleErrorCallback = function(error) { document.write(error); }; financeService.getPositionFeed(portfolioFeedUri, positionFeedCallback, handleErrorCallback); } </script> </head> <body> <div id="panel"/> </body> </html>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Finance APIs and Tools" group.
To post to this group, send email to goog...@googlegroups.com
To unsubscribe from this group, send email to
google-finance-apis+unsu...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-finance-apis?hl=en
-~----------~----~----~----~------~----~------~--~---







