Login using OAuth

I hope I don't come off as too much of a newbie so please be nice :-)
I have went through some of the examples and can create a webpage that displays top news stories and sushi places in San Fran. However I want to create a website that displays my Fantasy Football League team roster. When I use the following code that works with the examples with public data, it displays an empty box when I try to display the roster of my FFL team roster. I have tried several ways to try to login in but can't get it to work. I do have a app ID, consumer key and consumer key b'ut can't figure out where to use them. Is there just a few lines of code that I can put before this to make this work?

var items = o.query.results.team.roster.players.player;
var output = '';
var no_items=items.length;
for(var i=0;i<no_items;i++){
var title = items[i].player_id;
var link = items[i].image_url;
var desc = items[i].name.full;
output += "<h3><a href='" + link + "'>"+title+"</a></h3>" + desc + "<hr/>";
document.getElementById('results').innerHTML = output; }
<p><!-- Div tag for stories results --></p>
<div id="results"></div>
<p><!-- The YQL statment will be assigned to src. -->
<script src="http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20fantasysports.teams.roster%20where%20team_key%3D'242.l.484872.t.5'&amp;format=json&amp;diagnostics=true&amp;callback=top_stories">

1 Reply
  • I think the issue here is that team roster data isn't actually public information, so the public YQL entry point isn't allowed to work. We make you jump through more hoops to actually let the user authenticate your application to use their data. I'm almost positive this means that there's not an easy, one-step way to just make user data appear on your pages.

    This might be the most detail we've gotten through on this forum about how to do something like this simply:

    Check that out and see if it starts to answer any of your questions.

Recent Posts

in Fantasy Sports API