[twitter-dev] Facing problem with Twitter client integration on Iphone
I am integration Twitter cleint link in Iphone application but having autthentication not supported and my post isn't pusblishing on twitter website. I using this link below and my id and password are correct NSURL *url = [NSURL URLWithString:@http://twitter.com/statuses/ update.xml]; NSString *requestmain = [NSString stringWithFormat:@statuses= %@,@Testing purpose]; NSMutableURLRequest *mainRequest = [[NSMutableURLRequest alloc] initWithURL:url]; [mainRequest setValue:[NSString stringWithFormat:@%d,[requestmain length]] forHTTPHeaderField:@Content-length]; [mainRequest setHTTPBody:[requestmain dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]]; [mainRequest setValue:@application/x-www-form-urlencoded forHTTPHeaderField:@Content-Type]; [mainRequest setHTTPMethod:@POST]; [NSURLConnection connectionWithRequest:mainRequest delegate:self]; [mainRequest release]; I guess think isn't working properly http://twitter.com/statuses/update.xml - (void) connection:(NSURLConnection *)connection didFailWithError: (NSError *)error { NSLog(@Failed); } - (void) connectionDidFinishLoading:(NSURLConnection *)connection { NSLog(@Success); } - (void) connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { short cprev = [challenge previousFailureCount]; if (cprev == 0) { NSURLCredential *cred = [NSURLCredential credentialWithUser:user password:password persistence:NSURLCredentialPersistenceNone]; [[challenge sender] useCredential:cred forAuthenticationChallenge:challenge]; } else { [[challenge sender] cancelAuthenticationChallenge:challenge]; } } I always get a success log in my gdb but my post arent publishing on twitter portal with my login and pasword although I have complete access for it. -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Facing problem.
Hi there, I am using Mr David Billingham's PHP class file in application. http://twitter.slawcup.com/twitter.class.phps;. The request URL include parameter as username to fetch data from methods like userstatus($unm) (gives particular user's data) and followerscid($unm) gives that user's followers info and ratelimit() method (gives rate_limit_status). One of the e.g to API request is: function userstatus($unm) { $request = 'http://api.twitter.com/1/users/show/'.$unm.'.xmlhttp://api.twitter.com/1/users/show/%27.$unm.%27.xml'; return $this-process($request); } and call this method with twitter class object, gives error on accessing data as invalid arguments supplied in the main code but when I call it individually with print_r(arrayname) then it gives like- bool(false) . same thing happens with ratelimit() which gives error as Invalid Arguments Supplied to the method Using xml as extension to get data in xml format and developed whole code using xml(key-value pair) There is no proxy like thing as I hv uploaded files on server and dealing directly with it. Please help me on this. Thank you in advance. Rushi. On Wed, May 19, 2010 at 1:27 AM, Abraham Williams 4bra...@gmail.com wrote: What is the exact error? Abraham On Tue, May 18, 2010 at 00:07, Rushikesh Bhanage rishibhan...@gmail.comwrote: Hi, Yes, I had the same doubt, so I replaced a month back's TwitterAPI.php file and tried to run, but no happy moment and saw same error. Actually I was working on another module of this project so was not in touch with this, now I tried to run this but I don't understand why this is so because it was running perfectly few days back, but started giving error now. When I access ratelimit status through request URL it gives me data in value form not in (key-value) of xml format as it was giving previously. twitter is a class and ratelimit method has no arguments passed neither before nor now. your help will be greatly appreciated, Rushi On Mon, May 17, 2010 at 9:49 PM, Abraham Williams 4bra...@gmail.comwrote: Did you recently update TwitterAPI.php? It sounds like twitter() or ratelimit() need an argument passed int. Abraham On Mon, May 17, 2010 at 03:39, Rushikesh Bhanage rishibhan...@gmail.com wrote: Hi there, I am using this (sample code)code to get ratelimit status: ?php include(TwitterAPI.php); $t = new twitter(); $ratearr = $t-ratelimit(); print_r($ratearr); ? ratelimit() function contains the url: http://api.twitter.com/1/account/rate_limit_status.xml;. I was getting rate limit status with this up till now but now it gives error as invalid arguments supplied. But when I paste the same URL in address bar, I get rate_limit_status. why this is so? Rushi. -- Abraham Williams | Developer for hire | http://abrah.am @abraham | http://projects.abrah.am | http://blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private. -- Abraham Williams | Developer for hire | http://abrah.am @abraham | http://projects.abrah.am | http://blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private.
Re: [twitter-dev] Facing problem.
What does the rest of the error message say? What method is getting invalid arguments? What line in the PHP file is having the error? Abraham On Wed, May 19, 2010 at 01:23, Rushikesh Bhanage rishibhan...@gmail.comwrote: Hi there, I am using Mr David Billingham's PHP class file in application. http://twitter.slawcup.com/twitter.class.phps;. The request URL include parameter as username to fetch data from methods like userstatus($unm) (gives particular user's data) and followerscid($unm) gives that user's followers info and ratelimit() method (gives rate_limit_status). One of the e.g to API request is: function userstatus($unm) { $request = 'http://api.twitter.com/1/users/show/'.$unm.'.xmlhttp://api.twitter.com/1/users/show/%27.$unm.%27.xml'; return $this-process($request); } and call this method with twitter class object, gives error on accessing data as invalid arguments supplied in the main code but when I call it individually with print_r(arrayname) then it gives like- bool(false) . same thing happens with ratelimit() which gives error as Invalid Arguments Supplied to the method Using xml as extension to get data in xml format and developed whole code using xml(key-value pair) There is no proxy like thing as I hv uploaded files on server and dealing directly with it. Please help me on this. Thank you in advance. Rushi. On Wed, May 19, 2010 at 1:27 AM, Abraham Williams 4bra...@gmail.comwrote: What is the exact error? Abraham On Tue, May 18, 2010 at 00:07, Rushikesh Bhanage rishibhan...@gmail.comwrote: Hi, Yes, I had the same doubt, so I replaced a month back's TwitterAPI.php file and tried to run, but no happy moment and saw same error. Actually I was working on another module of this project so was not in touch with this, now I tried to run this but I don't understand why this is so because it was running perfectly few days back, but started giving error now. When I access ratelimit status through request URL it gives me data in value form not in (key-value) of xml format as it was giving previously. twitter is a class and ratelimit method has no arguments passed neither before nor now. your help will be greatly appreciated, Rushi On Mon, May 17, 2010 at 9:49 PM, Abraham Williams 4bra...@gmail.comwrote: Did you recently update TwitterAPI.php? It sounds like twitter() or ratelimit() need an argument passed int. Abraham On Mon, May 17, 2010 at 03:39, Rushikesh Bhanage rishibhan...@gmail.com wrote: Hi there, I am using this (sample code)code to get ratelimit status: ?php include(TwitterAPI.php); $t = new twitter(); $ratearr = $t-ratelimit(); print_r($ratearr); ? ratelimit() function contains the url: http://api.twitter.com/1/account/rate_limit_status.xml;. I was getting rate limit status with this up till now but now it gives error as invalid arguments supplied. But when I paste the same URL in address bar, I get rate_limit_status. why this is so? Rushi. -- Abraham Williams | Developer for hire | http://abrah.am @abraham | http://projects.abrah.am | http://blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private. -- Abraham Williams | Developer for hire | http://abrah.am @abraham | http://projects.abrah.am | http://blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private. -- Abraham Williams | Developer for hire | http://abrah.am @abraham | http://projects.abrah.am | http://blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private.
Re: [twitter-dev] Facing problem.
Hi there I have included TwitterAPI.php file in say show.php, in this main file when i call first function ratelimit() and access it thru foreach loop, it gives error as Invalid arguments supplied for foreach. I thought that problem would be for ratelimit() only, but when I executed userstatus($unm) and followers function individually in another file, it's giving error as: bool(false). Thank you in advance. On Wed, May 19, 2010 at 12:21 PM, Abraham Williams 4bra...@gmail.comwrote: What does the rest of the error message say? What method is getting invalid arguments? What line in the PHP file is having the error? Abraham On Wed, May 19, 2010 at 01:23, Rushikesh Bhanage rishibhan...@gmail.comwrote: Hi there, I am using Mr David Billingham's PHP class file in application. http://twitter.slawcup.com/twitter.class.phps;. The request URL include parameter as username to fetch data from methods like userstatus($unm) (gives particular user's data) and followerscid($unm) gives that user's followers info and ratelimit() method (gives rate_limit_status). One of the e.g to API request is: function userstatus($unm) { $request = 'http://api.twitter.com/1/users/show/'.$unm.'.xmlhttp://api.twitter.com/1/users/show/%27.$unm.%27.xml'; return $this-process($request); } and call this method with twitter class object, gives error on accessing data as invalid arguments supplied in the main code but when I call it individually with print_r(arrayname) then it gives like- bool(false) . same thing happens with ratelimit() which gives error as Invalid Arguments Supplied to the method Using xml as extension to get data in xml format and developed whole code using xml(key-value pair) There is no proxy like thing as I hv uploaded files on server and dealing directly with it. Please help me on this. Thank you in advance. Rushi. On Wed, May 19, 2010 at 1:27 AM, Abraham Williams 4bra...@gmail.comwrote: What is the exact error? Abraham On Tue, May 18, 2010 at 00:07, Rushikesh Bhanage rishibhan...@gmail.com wrote: Hi, Yes, I had the same doubt, so I replaced a month back's TwitterAPI.php file and tried to run, but no happy moment and saw same error. Actually I was working on another module of this project so was not in touch with this, now I tried to run this but I don't understand why this is so because it was running perfectly few days back, but started giving error now. When I access ratelimit status through request URL it gives me data in value form not in (key-value) of xml format as it was giving previously. twitter is a class and ratelimit method has no arguments passed neither before nor now. your help will be greatly appreciated, Rushi On Mon, May 17, 2010 at 9:49 PM, Abraham Williams 4bra...@gmail.comwrote: Did you recently update TwitterAPI.php? It sounds like twitter() or ratelimit() need an argument passed int. Abraham On Mon, May 17, 2010 at 03:39, Rushikesh Bhanage rishibhan...@gmail.com wrote: Hi there, I am using this (sample code)code to get ratelimit status: ?php include(TwitterAPI.php); $t = new twitter(); $ratearr = $t-ratelimit(); print_r($ratearr); ? ratelimit() function contains the url: http://api.twitter.com/1/account/rate_limit_status.xml;. I was getting rate limit status with this up till now but now it gives error as invalid arguments supplied. But when I paste the same URL in address bar, I get rate_limit_status. why this is so? Rushi. -- Abraham Williams | Developer for hire | http://abrah.am @abraham | http://projects.abrah.am | http://blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private. -- Abraham Williams | Developer for hire | http://abrah.am @abraham | http://projects.abrah.am | http://blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private. -- Abraham Williams | Developer for hire | http://abrah.am @abraham | http://projects.abrah.am | http://blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private.
Re: [twitter-dev] Facing problem.
What is the exact error? Abraham On Tue, May 18, 2010 at 00:07, Rushikesh Bhanage rishibhan...@gmail.comwrote: Hi, Yes, I had the same doubt, so I replaced a month back's TwitterAPI.php file and tried to run, but no happy moment and saw same error. Actually I was working on another module of this project so was not in touch with this, now I tried to run this but I don't understand why this is so because it was running perfectly few days back, but started giving error now. When I access ratelimit status through request URL it gives me data in value form not in (key-value) of xml format as it was giving previously. twitter is a class and ratelimit method has no arguments passed neither before nor now. your help will be greatly appreciated, Rushi On Mon, May 17, 2010 at 9:49 PM, Abraham Williams 4bra...@gmail.comwrote: Did you recently update TwitterAPI.php? It sounds like twitter() or ratelimit() need an argument passed int. Abraham On Mon, May 17, 2010 at 03:39, Rushikesh Bhanage rishibhan...@gmail.comwrote: Hi there, I am using this (sample code)code to get ratelimit status: ?php include(TwitterAPI.php); $t = new twitter(); $ratearr = $t-ratelimit(); print_r($ratearr); ? ratelimit() function contains the url: http://api.twitter.com/1/account/rate_limit_status.xml;. I was getting rate limit status with this up till now but now it gives error as invalid arguments supplied. But when I paste the same URL in address bar, I get rate_limit_status. why this is so? Rushi. -- Abraham Williams | Developer for hire | http://abrah.am @abraham | http://projects.abrah.am | http://blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private. -- Abraham Williams | Developer for hire | http://abrah.am @abraham | http://projects.abrah.am | http://blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private.
[twitter-dev] Facing problem.
Hi there, I am using this (sample code)code to get ratelimit status: ?php include(TwitterAPI.php); $t = new twitter(); $ratearr = $t-ratelimit(); print_r($ratearr); ? ratelimit() function contains the url: http://api.twitter.com/1/account/rate_limit_status.xml;. I was getting rate limit status with this up till now but now it gives error as invalid arguments supplied. But when I paste the same URL in address bar, I get rate_limit_status. why this is so? Rushi.
Re: [twitter-dev] Facing problem.
Did you recently update TwitterAPI.php? It sounds like twitter() or ratelimit() need an argument passed int. Abraham On Mon, May 17, 2010 at 03:39, Rushikesh Bhanage rishibhan...@gmail.comwrote: Hi there, I am using this (sample code)code to get ratelimit status: ?php include(TwitterAPI.php); $t = new twitter(); $ratearr = $t-ratelimit(); print_r($ratearr); ? ratelimit() function contains the url: http://api.twitter.com/1/account/rate_limit_status.xml;. I was getting rate limit status with this up till now but now it gives error as invalid arguments supplied. But when I paste the same URL in address bar, I get rate_limit_status. why this is so? Rushi. -- Abraham Williams | Developer for hire | http://abrah.am @abraham | http://projects.abrah.am | http://blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private.
Re: [twitter-dev] Facing problem.
Hi, Yes, I had the same doubt, so I replaced a month back's TwitterAPI.php file and tried to run, but no happy moment and saw same error. Actually I was working on another module of this project so was not in touch with this, now I tried to run this but I don't understand why this is so because it was running perfectly few days back, but started giving error now. When I access ratelimit status through request URL it gives me data in value form not in (key-value) of xml format as it was giving previously. twitter is a class and ratelimit method has no arguments passed neither before nor now. your help will be greatly appreciated, Rushi On Mon, May 17, 2010 at 9:49 PM, Abraham Williams 4bra...@gmail.com wrote: Did you recently update TwitterAPI.php? It sounds like twitter() or ratelimit() need an argument passed int. Abraham On Mon, May 17, 2010 at 03:39, Rushikesh Bhanage rishibhan...@gmail.comwrote: Hi there, I am using this (sample code)code to get ratelimit status: ?php include(TwitterAPI.php); $t = new twitter(); $ratearr = $t-ratelimit(); print_r($ratearr); ? ratelimit() function contains the url: http://api.twitter.com/1/account/rate_limit_status.xml;. I was getting rate limit status with this up till now but now it gives error as invalid arguments supplied. But when I paste the same URL in address bar, I get rate_limit_status. why this is so? Rushi. -- Abraham Williams | Developer for hire | http://abrah.am @abraham | http://projects.abrah.am | http://blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private.
Re: [twitter-dev] Facing problem with rate-limit.
Hi, Thank you for the reply. I understand what you are saying, but is it possible to get more than one user account whitelisted? When I looked at the whitelisting form, it suggests to add IPs and not user accounts. Let me know please, Thank you. On Tue, Mar 9, 2010 at 10:19 PM, Abraham Williams 4bra...@gmail.com wrote: If you make the requests authenticated as your users each one will have 20k hits per hour. Each whitelisted entity, whether an account or IP address, is allowed 2 requests per hour. This means that two authenticated users using the same IP address would each get 2 requests per hour. - http://apiwiki.twitter.com/Rate-limiting Depending on your application you can cache all the user objects and then use the Social Graph APIs to find missing profiles. Abraham On Tue, Mar 9, 2010 at 02:37, Rushikesh Bhanage rishibhan...@gmail.comwrote: Hi , We are building a twitter application which needs to collect all the followers of the user to show him results. Now when we looked at following user's: user Followers ev - 1,172,553 aplusk -4,627,964 Kim Kardashian - 3,144,680 such users through our application it turns out 20,000 calls per white-listed IP without breaking operation, are not sufficient to collect all the followers of these users. Because every cursor id gives only 100 follower's data which means 20,000 calls are not sufficient for some users with extensive followers. Eagerly looking for solution, Thank you. Regards, Rushikesh. -- Abraham Williams | Community Advocate | http://abrah.am TwitterOAuth | http://github.com/abraham/twitteroauth This email is: [ ] shareable [x] ask first [ ] private.
Re: [twitter-dev] Facing problem with rate-limit.
Probably. But the text I referenced means each non-whitelisted account on a whitelisted IP gets 20k/hour. Abraham On Wed, Mar 10, 2010 at 02:19, Rushikesh Bhanage rishibhan...@gmail.comwrote: Hi, Thank you for the reply. I understand what you are saying, but is it possible to get more than one user account whitelisted? When I looked at the whitelisting form, it suggests to add IPs and not user accounts. Let me know please, Thank you. On Tue, Mar 9, 2010 at 10:19 PM, Abraham Williams 4bra...@gmail.comwrote: If you make the requests authenticated as your users each one will have 20k hits per hour. Each whitelisted entity, whether an account or IP address, is allowed 2 requests per hour. This means that two authenticated users using the same IP address would each get 2 requests per hour. - http://apiwiki.twitter.com/Rate-limiting Depending on your application you can cache all the user objects and then use the Social Graph APIs to find missing profiles. Abraham On Tue, Mar 9, 2010 at 02:37, Rushikesh Bhanage rishibhan...@gmail.comwrote: Hi , We are building a twitter application which needs to collect all the followers of the user to show him results. Now when we looked at following user's: user Followers ev - 1,172,553 aplusk -4,627,964 Kim Kardashian - 3,144,680 such users through our application it turns out 20,000 calls per white-listed IP without breaking operation, are not sufficient to collect all the followers of these users. Because every cursor id gives only 100 follower's data which means 20,000 calls are not sufficient for some users with extensive followers. Eagerly looking for solution, Thank you. Regards, Rushikesh. -- Abraham Williams | Community Advocate | http://abrah.am TwitterOAuth | http://github.com/abraham/twitteroauth This email is: [ ] shareable [x] ask first [ ] private. -- Abraham Williams | Community Advocate | http://abrah.am TwitterOAuth | http://github.com/abraham/twitteroauth This email is: [ ] shareable [x] ask first [ ] private.
[twitter-dev] Facing problem with rate-limit.
Hi , We are building a twitter application which needs to collect all the followers of the user to show him results. Now when we looked at following user's: user Followers ev - 1,172,553 aplusk -4,627,964 Kim Kardashian - 3,144,680 such users through our application it turns out 20,000 calls per white-listed IP without breaking operation, are not sufficient to collect all the followers of these users. Because every cursor id gives only 100 follower's data which means 20,000 calls are not sufficient for some users with extensive followers. Eagerly looking for solution, Thank you. Regards, Rushikesh.
Re: [twitter-dev] Facing problem with rate-limit.
If you make the requests authenticated as your users each one will have 20k hits per hour. Each whitelisted entity, whether an account or IP address, is allowed 2 requests per hour. This means that two authenticated users using the same IP address would each get 2 requests per hour. - http://apiwiki.twitter.com/Rate-limiting Depending on your application you can cache all the user objects and then use the Social Graph APIs to find missing profiles. Abraham On Tue, Mar 9, 2010 at 02:37, Rushikesh Bhanage rishibhan...@gmail.comwrote: Hi , We are building a twitter application which needs to collect all the followers of the user to show him results. Now when we looked at following user's: user Followers ev - 1,172,553 aplusk -4,627,964 Kim Kardashian - 3,144,680 such users through our application it turns out 20,000 calls per white-listed IP without breaking operation, are not sufficient to collect all the followers of these users. Because every cursor id gives only 100 follower's data which means 20,000 calls are not sufficient for some users with extensive followers. Eagerly looking for solution, Thank you. Regards, Rushikesh. -- Abraham Williams | Community Advocate | http://abrah.am TwitterOAuth | http://github.com/abraham/twitteroauth This email is: [ ] shareable [x] ask first [ ] private.
[twitter-dev] facing problem in twitter serach API access
Hi All, I am trying write a simple Android program to get public timelines from twitter corressponding to a keyword. Given below is the snapshot of the code ...below code is blocking on request.getResponseCode() call. Anybody has idea what could be the problem? -- URL url = *new* URL(http://search.twitter.com/search.json?q=pune); URLConnection connection; connection = url.openConnection(); HttpURLConnection request = (HttpURLConnection) connection; int responsecode = request.getResponseCode() ; // Code is just blocking here -- I have broadband internet connection at home. From home PC I am trying to execute program which has above code. The Internet permissions are granted by adding uses-permission android:name=*android.permission.INTERNET* / line to the manifest file. I have a firewall configured and running on my PC. I am trying to launch android emulater via eclipse version 3.4.2 (ADT has been added to the eclipse). Please let me know if anybody has faced similar problems. Thanks Regards, Narendra
[twitter-dev] facing problem in twitter search API access
Hi All, I am trying write a simple Android program to get public timelines from twitter corressponding to a keyword. Given below is the snapshot of the code ...below code is blocking on request.getResponseCode() call. Anybody has idea what could be the problem? -- URL url = new URL(http://search.twitter.com/search.json?q=pune); URLConnection connection; connection = url.openConnection(); HttpURLConnection request = (HttpURLConnection) connection; int responsecode = request.getResponseCode() ; // Code is just blocking here -- I have broadband internet connection at home. From home PC I am trying to execute program which has above code. The Internet permissions are granted by adding uses-permission android:name=android.permission.INTERNET / line to the manifest file. I have a firewall configured and running on my PC. I am trying to launch android emulater via eclipse version 3.4.2 (ADT has been added to the eclipse). Please let me know if anybody has faced similar problems. Thanks Regards, Narendra