[twitter-dev] Re: Is it okay to close a connection by opening a new one?

2009-07-15 Thread avinash srivastava
Hi,

You can take some hint from here -
http://hasin.wordpress.com/2009/06/20/collecting-data-from-streaming-api-in-twitter/

Avinash

On Wed, Jul 15, 2009 at 4:43 AM, Joel Strellner j...@twitturly.com wrote:

  Why can’t you do this entirely in your code?  Why do you need to close
 the connection and reconnect?



 Closing a file, moving it, and then creating a new file should be able to
 be done extremely fast, thus you shouldn’t need to close your connection to
 Twitter.



 Also, if at all possible, JSON is a much better format to use.  It’s
 smaller over the wire, and it’ll create smaller files.



 -Joel





 *From:* twitter-development-talk@googlegroups.com [mailto:
 twitter-development-t...@googlegroups.com] *On Behalf Of *Alex Payne
 *Sent:* Tuesday, July 14, 2009 4:07 PM
 *To:* twitter-development-talk@googlegroups.com
 *Subject:* [twitter-dev] Re: Is it okay to close a connection by opening a
 new one?



 If you're only doing this every hour, that's fine by us.

 On Tue, Jul 14, 2009 at 15:58, owkaye owk...@gmail.com wrote:


 The Streaming API docs say we should avoid opening new
 connections with the same user:pass when that user already
 has a connection open.  But I'm hoping it is okay to do this
 every hour or so, here's why:

 My plan is to write the streaming XML data to a text file
 during each connection -- but I don't want this file to get
 so big that I have trouble processing it on the back end.
 Therefore I want to rotate these files every hour ...

 This means I have to stop writing to the file, close it, move
 it somewhere else, and create a new file so I can use the new
 file to continue storing new streaming XML data.

 The obvious way for me to close these files is to close the
 connection -- by opening a new connection -- because from
 what I've read it seems that opening a new connection forces
 the previous connection to close.

 Can I do this without running into any black listing or
 denial of service issues?  I mean, is this an acceptable way
 to close a connection ... by opening a new one in order to
 force the old connection to close?

 Any info you can provide that will clarify this issue is
 greatly appreciated, thanks!

 Owkaye







 --
 Alex Payne - Platform Lead, Twitter, Inc.
 http://twitter.com/al3x



[twitter-dev] Re: Posting with long URLs (more than 140 chars total, before URL is shortened)

2009-07-10 Thread avinash srivastava
Hi,

Just an alternate method to do it - You can do url find and url shortening
with bitly before posting to twitter.

Avinash

On Fri, Jul 10, 2009 at 4:20 PM, TomerN tomerna...@gmail.com wrote:


 I'd like to programatically post updates that may be longer than 140
 chars because they sometime contain long URLs. Those URLs will
 eventually be shortened by twitter - but I can't seem to post such
 updates because the origin is too long. Is there any workaround for
 this?



[twitter-dev] Re: making API call to update status

2009-06-03 Thread avinash srivastava
looks like while setting up your application you have asked for read
permission only. Check for access type in your application settings on
twitter and make it read and write.


Avinash


On Thu, Jun 4, 2009 at 10:20 AM, Nasir nasirahmadk...@gmail.com wrote:


 Hi,

 Can any one help me to make api call after authentication using OAuth-
 php. Its gives an error   (Read-only application cannot POST)

 Thanks