Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

TFJ-746 use GET method to workaround the API side issue

  • Loading branch information...
commit 858de074cd719ab5b362f93dcf37bab8d4e8909a 1 parent 53b2f65
@yusuke authored
View
2  twitter4j-core/src/main/java/twitter4j/TwitterImpl.java
@@ -804,7 +804,7 @@ public User destroyBlock(String screen_name) throws TwitterException {
*/
@Override
public ResponseList<User> lookupUsers(long[] ids) throws TwitterException {
- return factory.createUserList(post(conf.getRestBaseURL() + "users/lookup.json"
+ return factory.createUserList(get(conf.getRestBaseURL() + "users/lookup.json"
, new HttpParameter[]{new HttpParameter("user_id", z_T4JInternalStringUtil.join(ids))}));
}
View
5 twitter4j-core/src/test/java/twitter4j/FriendsFollowersResourcesTest.java
@@ -223,6 +223,11 @@ public void testRelationship() throws Exception {
assertFalse(updatedRelationship.isSourceWantRetweets());
}
+ public void testLookupFriendships() throws Exception{
+ // https://dev.twitter.com/discussions/13658
+ //http://jira.twitter4j.org/browse/TFJ-746
+ readonly.lookupUsers(new long[]{255794088L,441705930L,100581062L,49255734L,996328051L,559170296L,119261332L,373027695L,18515199L,83777877L,28973601L,228325562L,3474001L,297909405L,79159050L,94355673L,882514368L,97212832L,6459802L,124127525L,9121432L,57142748L,15797140L,985973888L,216250008L,121663344L,14832427L,54904048L,47539662L,22330739L,41032024L,24160034L,70614432L,489294299L,165725102L,203209274L,93831273L,49661959L,15670331L,30597967L,194643708L,70630881L,105973663L,114333005L,76407522L,5898822L,43796154L,5929112L,14118563L,64378588L,60287587L,28745562L,77718059L,106944925L,15744975L,81170234L,98512820L,20766533L,91238103L,15965719L,351559615L,5371072L,582489524L,367671660L,4037021L,52773639L,440662114L,14288985L,3868621L,13585812L,3811061L,14724896L,5491152L,4862261L,106114624L,459133564L,6609032L,4175171L,565734536L,174637883L,834785976L,338234111L,278590903L,205621126L,7362472L,329830408L,116640150L,52106559L,831322291L,53856691L,313143098L,563798434L,219589985L,5420012L,15142903L,107381955L,117652722L,188738873L,167628541L});
+ }
public void testIncomingOutgoingFriendships() throws Exception {
IDs ids;
ids = twitter3.getIncomingFriendships(-1);
View
4 twitter4j-core/src/test/java/twitter4j/TwitterTestBase.java
@@ -31,7 +31,7 @@ public TwitterTestBase(String name) {
protected Twitter twitter1, twitter2, twitter3,
twitterAPIBestFriend1, twitterAPIBestFriend2,
- rwPrivateMessage;
+ rwPrivateMessage, readonly;
protected Properties p = new Properties();
protected String numberId, numberPass, followsOneWay;
@@ -99,6 +99,8 @@ protected void setUp() throws Exception {
twitterAPIBestFriend2 = new TwitterFactory(bestFriend2Conf).getInstance();
followsOneWay = p.getProperty("followsOneWay");
+
+ readonly = new TwitterFactory(new PropertyConfiguration(p, "/readonly")).getInstance();
}
public void testDummy(){
Please sign in to comment.
Something went wrong with that request. Please try again.