Using Google Feed API to get Google Bookmarks

144 views
Skip to first unread message

Dave

unread,
Nov 5, 2013, 8:38:35 AM11/5/13
to google-ajax...@googlegroups.com
Hi

I've been trying this for a couple of days so would appreciate any advice some people here might be able to give.

In summary, with iGoogle now gone, I am trying to create my own replacement homepage using various RSS feeds.I thought using JavaScript would presumably mean that if I'm logged into the Google Service in my browser, I can access my RSS feed. Perhaps my problem is purely down to that flawed assumption?

Anyway, long story short, if I use the code below, I get a success message when I use a BBC News feed, but a failure message when I switch it to use the Google Bookmarks feed.

Here is a simple unit test example of what I'm trying:

<script type="text/javascript" src="https://www.google.com/jsapi"></script>
 
<script type="text/javascript"> 
    // load the feeds module 
    google.load("feeds", "1");
 
    // load feed and output result
    var feed = new google.feeds.Feed("https://www.google.com/bookmarks/?output=rss");
    feed.load(function(result){
        if (result.error){ 
            alert("error");
        }
        else{
            alert("good");
        }
});
</script> 

I presume I am getting no results because I am failing to authenticate. Does anyone have a solution?

Jeremy Geerdes

unread,
Nov 5, 2013, 10:40:47 AM11/5/13
to google-ajax...@googlegroups.com
Well, I'm afraid I don't have good news for you. In order to do what you're wanting to do, you do indeed have to be authenticated/logged in to Google. Unfortunately, that's not possible with the Feeds API. As you suspected, just because you're using JavaScript to access the API doesn't mean you will just authenticate. In fact, the JS component of the Feeds API is just a wrapper which communicates with a script on Google's servers, which pulls a cached version of the feed you're looking for. This cached version was crawled by Google's servers. So it doesn't have access to your cookies or credentials as a request from your browser would. Even worse, there is no direct Google Bookmarks API, so I really don't know what to recommend as a workaround.

Sorry!

jg


On Tue, Nov 5, 2013 at 9:38 AM, Rev. Jeremy R. Geerdes <jgee...@debraheightswesleyan.org> wrote:
Well, I'm afraid I don't have good news for you. In order to do what you're wanting to do, you do indeed have to be authenticated/logged in to Google. Unfortunately, that's not possible with the Feeds API. As you suspected, just because you're using JavaScript to access the API doesn't mean you will just authenticate. In fact, the JS component of the Feeds API is just a wrapper which communicates with a script on Google's servers, which pulls a cached version of the feed you're looking for. This cached version was crawled by Google's servers. So it doesn't have access to your cookies or credentials as a request from your browser would. Even worse, there is no direct Google Bookmarks API, so I really don't know what to recommend as a workaround.

Sorry!

jg





--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/56d93e7a-eb6a-4d2d-8622-8834342096b1%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Rev. Jeremy R. Geerdes, Pastor
Debra Heights Wesleyan Church
4025 Lower Beaver Rd
Des Moines, IA 50310




--
Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!
Reply all
Reply to author
Forward
0 new messages