How can I get the 3200 most recent tweets from a users timeline as documented?
I know I can only get 200 tweets per request. I want to use the page parameter, but the page parameter is no longer present in the current documentation. It did contain the optional page parameter originally but
will soon cease to be functional
Also I work with the python-twitter library and the GetUserTimeline function from the API object has no optional page parameter.
Maybe this has something to do with the switch from Twitter API v1.0 to v1.1?
Related
LinkedIn api provides access token to use it in url to post a message which uses oauth2 in Rest client. So by using the url in my application, i can post the message.
Twitter api uses oauth1 to tweet by accepting parameter.But the problem is timestamp,nounce,oauth_signature parameters gets auto generated and keep on changing for every request in Rest client.Here url is not sufficient to tweet, it need parameters but 3 parameters keep on changing on Rest client.
I tried to pass every parameter in url, it throws
error: code 32, could not authenticate you
i am dependent only on url to send a tweet.My application supports parameters too but three parameters are auto generating.I cant auto generate bcz i am hardcoding it in my application.
Is there any solution to tweet by using url?
Is there any way to make those 3 parameters fixed?
It's hard to tell what's going on here. Perhaps you could post more of the code and what you expected to happen?
By definition the nonce is a number only used once, and shouldn't be hardcoded. The timestamp also should reflect the current time on each request.
https://en.wikipedia.org/wiki/Cryptographic_nonce
Im working on Contact's API with oAuth 2.0.. I want to fetch only a few fields and not the whole dataset. It works fine on the OAuth playground https://developers.google.com/oauthplayground
However, when using Jquery ajax to request it (after getting the token), it gives me the error Fields query parameter is not supported. Without the &fields= param, it works fine..
Here are the details about the fields param:
https://developers.google.com/gdata/docs/2.0/reference#PartialResponse
Btw, the reason for ajax request is well listed here:
Getting google contacts with javascript
The OAuth2 playground works with Google Contacts API V3, and the fields param is supposed to work with deprecated API v2 (you can even see a warning in the link you pointed for the fields params).
For V3, you cannot specify few fields than allowed. But you can select between a short answer, full answer with default fields, and full answer with extra fields not returned by default.
See Projection Values.
So, probably you want to request the thin Projection Value.
You can see it in action in the Playground using this URL on step 3:
https://www.google.com/m8/feeds/contacts/default/thin?alt=json
Pay attention to the thin, when most people and tutorials use full.
Twitter no longer allows default search widgets which use search.twitter.com/search.json
(It returns empty results for everything
Since 1.1 requires Auth, how can we put customized json queries on our sites just using javascript?
Twitter's new widgets return the result in html formatted form, so we can't use that either..
What should we do know? How do you do it now without auth?
Using MVC4, I would like to get the recent Tweets (3) of user's without having to request access from them, because that is a pain for the user. This is also because a user may be viewing another user and I would also like to display their Tweets.
This was fairly simple with Twitter API v1:
$.ajax({
url: 'https://api.twitter.com/1/statuses/user_timeline.json?count=3&screen_name=' + twitterUser,
...
});
..but its deprecated and will stop working in about two months from now.
I'm new to Oauth and have struggled to find any good material on how to get a user's Tweets, but I believe the process is a lot more complicated now with the Twitter API v1.1? Ideally, I'd like to achieve everthing in the front end, but think that I now need to do some authentication server side and will have to use MVC?
In order to get any user's Tweets, I was thinking that I could create a Twitter account for my application and use that to get anyone's Tweets, as long as they are not protected.
Does anyone know of any good libraries that I can use to achieve this, or is the out of the box MVC4 Oauth stuff alone enough to do the job?
Any suggestions of where to start, and especially examples would be greatly appreciated.
To use API 1.1, you have to have a Twitter account and a Twitter application and then use OAUTH to authenticate your rate limited requests using GET statuses/show/:id. The only alternative I know is RSS which both Twitter & Facebook have kiiled, briught back and threatened to kill again:
http://api.twitter.com/1/statuses/user_timeline.rss?screen_name={USERNAME}
I decided to use Linq2Twitter, as this makes use of the V1.1 API.
An MVCDemo example of Linq2Twitter stores the authorised credentials in a SessionStateCredentials object, but I can store the object in cache and persist the authorisation for all users, meaning they won't have to authorise anything. Provided that a user's Tweets aren't protected, the Tweet's for any user should be retrievable this way.
I'm trying to UrlFetch the RSS/Atom feed from my site's news page "posts" URL https://sites.google.com/a/mydomain/my-site/my-announcements-page/posts.xml. It works in the browser for me as a logged user.
I am wanting to to do a Urlfetch because it seems to be a super fast way to get a count of pages and dates (<2 seconds). Doing it via the SitesApp Pages iteration or search takes 5 to 25 seconds). The site is a tiny one with lightweight content and < 50 pages.
Anyway, so I want to UrlFetch my site's posts URL and I guess I need an OAuth scope and get a token.
I have tried the scope "https://sites.google.com/feeds/" from the gdata Sites API https://developers.google.com/google-apps/sites/docs/1.0/developers_guide_protocol#Auth and using it on the Oauth Playground 2.0 and it works for documented API feed urls but not for my site's posts.xml URL. I get a 401 "Token invalid - AuthSub token has wrong scope" when I try to access that in the playground.
So my question is: Is it possible to use Urlfetch with an oauth token to access the pages's posts.xml? What OAuth scope do I use to get the token?
UrlFetchApp currently supports only OAuth 1.0. Try using that instead.
Just to close off this question. I didn't find a way to access the pages's posts.xml via a urlfetch. Instead, I created my own ContentService function to return as text the number of the page's children published since a particular time via myAnnouncementsPage.getChildren().