jquery - How to form google+ get posts url -
i trying request posts google+ profile. can data using simple api , default url. api docs show options are, don't explain how use them. goal set maxresults option. here got:
$.ajax({ url: "https://www.googleapis.com/plus/v1/people/{my user id}/activities/public?key=dfaskjfklsjfldfsjsadlkjflsd", type: "get", success: function(data){ } });
there several ways you're trying.
1) request parameters appended base url after question mark, , separated &. url might like
https://www.googleapis.com/plus/v1/people/{my user id}/activities/public?key=fldskjflkdsjaflsajflsjfasl&maxresults=10 one tool use "try it!" section @ bottom of https://developers.google.com/+/api/latest/activities/list let fill in fields , show http request makes.
2) in jquery, can specify parameters url using data field in call $.ajax. same example might like:
$.ajax({ url: "https://www.googleapis.com/plus/v1/people/{my user id}/activities/public" data: { key: "fldskjflkdsjaflsajflsjfasl", maxresults: 10 }, type: "get", success: function(data){ } }); 3) can use javascript client libraries available download https://developers.google.com/+/downloads/ (which has sample code how use it).
Comments
Post a Comment