Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

superfeedr-jquery retrieve.html example expected response is unclear #1

Open
NorthDecoder opened this issue Feb 17, 2017 · 0 comments

Comments

@NorthDecoder
Copy link

NorthDecoder commented Feb 17, 2017

To prove that the blog feeder is functional, copy and paste the URL http://blog.superfeedr.com/atom.xml into the browser, and see that it redirects to the URL https://superfeedr-blog-feed.herokuapp.com which renders the Superfeedr blog rss feed.

Now with rawgit run the retrieve.html example by pasting the following into the url bar:
http://rawgit.com/superfeedr/superfeedr-jquery/master/examples/retrieve.html
and see that the result is:

adfs
fa
dfadf
afg
adsfas

It seems like the Superfeedr blog should be shown and not the random text, however reading further into the retrieve.html code see that a second feed http://push-pub.appspot.com/feed overwrites the first feed. That is confusing to the those new to this application. The example should not require debugging 😃

Create two distinct id's for two div tags so both results can be seen.

<div id="feed1"></div>
<div id="feed2"></div>

and change the javascript too!

    var feed = new $.superfeedr.Feed('...');     //becomes
    var feed1 = new $.superfeedr.Feed('...');
    feed1.setNumEntries(4);
    feed1.setResultFormat('json');

    feed1.load( ...
                   ...   document.getElementById("feed1")  // in two places

and further down

    var feed = new $.superfeedr.Feed('...'); // becomes
    var feed2 = new $.superfeedr.Feed('...');

    feed2.stream(...
                    ... document.getElementById("feed2")   // in two places

After doing all that, find that feed1 is getting a 403 Forbidden error in the network console, but that error message is not being returned as an error to the javascript, so it just dies quietly, never entering the .load callback function.

Here is the test pen .

Try swapping the feed2 URL into the line for feed1. Note that the code is functioning, so the problem is not the code (in the above pen) but rather with the permissions of the feed.

Hopefully this is helpful and not too irritating. I imagine that the new owners would like to have functioning examples to better promote superfeedr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant