[twitter-dev] Re: 406 on streaming filter calls

2011-04-22 Thread Josiah Carlson
To follow up:

I switched to a GET request, despite the docs saying "Use a POST request 
header parameter to avoid long URLs.". This seems to have resolved the 
issue. Why change now?

 - Josiah

-- 
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


[twitter-dev] Re: How to create a website using twitter on a local machine?

2011-04-22 Thread Patrick Kennedy
KiTe,

Twitter has provisioned a way for developers to handle this Dev
issue.  Add to your hosts file "local.dev", and use 127.0.0.1 as the
IP.  Then use http://local.dev/ as the prefix with whatever files you
develop locally, e.g, http://local.dev/myapp/index.php.

Register your new app at Twitter: https://twitter.com/apps

Then, go to https://dev.twitter.com/apps and click on the given app
you made, and click on "My Access Token", and copy both the token and
token secret.  Populate your app with those.

That way, when you access your local development server via http://local.dev/...
the call back won't really happen, instead you will hardwire your app
to use the token and token secret, which you just got from the
dev.twitter.com web site.  You can then build if-then branches - if
local.dev, use my development tokens; otherwise, the real callback
process and get the user token and token secret and initialize
things.

It takes time and research to master the process, but it's fun.  Good
luck.

~Patrick

On Apr 22, 3:02 am, kite <68...@supinfo.com> wrote:
> Hello,
>
> I want to create a website using the twitter API (through linq to
> twitter) for schooling purpose, but I do not have a server to host it.
>
> How can I still make my application work when running locally? I can't
> fill the "website url" and "callback url" since I host the site on my
> own computer, on my local network.
>
> Cordially,
>
> KiTe

-- 
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


[twitter-dev] 500 error for android Twitter

2011-04-22 Thread Abhishek Soni
Hello everyone,
   I am implementing twitter on android by using sugree API for
android.  I am able to get the access token.  But when i post the status to
twitter i am getting this response:

04-22 18:32:36.909: DEBUG/RESPONSE(407): Status: 500 Internal Server
ErrorContent-Type: text/html500 Internal Server
ErrorStatus: 500 Internal Server ErrorContent-Type:
text/html500 Internal Server Error

I am getting this error:

04-22 18:32:36.479: DEBUG/Twitter-Util(407): POST URL:
http://api.twitter.com/1/statuses/update.xml
04-22 18:32:36.589: INFO/global(407): Default buffer size used in
BufferedOutputStream constructor. It would be better to be explicit if an 8k
buffer is required.
04-22 18:32:36.599: WARN/Bundle(407): Key method expected byte[] but value
was a java.lang.String.  The default value  was returned.
04-22 18:32:36.679: WARN/Bundle(407): Attempt to cast generated internal
exception:
04-22 18:32:36.679: WARN/Bundle(407): java.lang.ClassCastException:
java.lang.String
04-22 18:32:36.679: WARN/Bundle(407): at
android.os.Bundle.getByteArray(Bundle.java:1305)
04-22 18:32:36.679: WARN/Bundle(407): at
com.sugree.twitter.Util.encodePostBody(Util.java:63)
04-22 18:32:36.679: WARN/Bundle(407): at
com.sugree.twitter.Util.openUrl(Util.java:178)
04-22 18:32:36.679: WARN/Bundle(407): at
com.tacpoint.twitter.TwitterConnect$1.onClick(TwitterConnect.java:53)
04-22 18:32:36.679: WARN/Bundle(407): at
android.view.View.performClick(View.java:2408)
04-22 18:32:36.679: WARN/Bundle(407): at
android.view.View$PerformClick.run(View.java:8816)
04-22 18:32:36.679: WARN/Bundle(407): at
android.os.Handler.handleCallback(Handler.java:587)
04-22 18:32:36.679: WARN/Bundle(407): at
android.os.Handler.dispatchMessage(Handler.java:92)
04-22 18:32:36.679: WARN/Bundle(407): at
android.os.Looper.loop(Looper.java:123)
04-22 18:32:36.679: WARN/Bundle(407): at
android.app.ActivityThread.main(ActivityThread.java:4627)
04-22 18:32:36.679: WARN/Bundle(407): at
java.lang.reflect.Method.invokeNative(Native Method)
04-22 18:32:36.679: WARN/Bundle(407): at
java.lang.reflect.Method.invoke(Method.java:521)
04-22 18:32:36.679: WARN/Bundle(407): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-22 18:32:36.679: WARN/Bundle(407): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-22 18:32:36.679: WARN/Bundle(407): at
dalvik.system.NativeStart.main(Native Method)

04-22 18:32:36.909: DEBUG/RESPONSE(407): Status: 500 Internal Server
ErrorContent-Type: text/html500 Internal Server
ErrorStatus: 500 Internal Server ErrorContent-Type:
text/html500 Internal Server Error



Thanks in advance,
   aby

-- 
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


[twitter-dev] Re: /1/lists/show doesn't work when given a list slug

2011-04-22 Thread Joe Mayo
Seeing the same thing here.  It would be nice to have some guidance on
proper usage or confirmation whether it's a bug.

Joe

On Apr 22, 4:16 pm, Craig Walls  wrote:
> Per this 
> announcement:http://groups.google.com/group/twitter-api-announce/browse_thread/thr...
>
> I'm changing my code to use the new routes. When I do something like:
>
> https://api.twitter.com/1/lists/show.json?list_id={list ID}
> &screen_name={screen name} 
> orhttps://api.twitter.com/1/lists/show.json?list_id={list
> ID}&user_id={user ID}
>
> ...it works fine. In fact, it seems that the screen_name and user_id
> are optional when using a list ID (because the list ID is unique on
> its own?).
>
> But if I do this...
>
> https://api.twitter.com/1/lists/show.json?slug={slug}&screen_name={screen
> name} orhttps://api.twitter.com/1/lists/show.json?slug={slug}&user_id={user
> ID}
>
> ...it doesn't work. I've tried it for several different list slugs,
> both public and private, and no dice. Every time I get an HTTP 400
> response.
>
> Per that announcement, shouldn't it work if I give it the list slug
> and either a user ID or screen name?

-- 
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


[twitter-dev] 406 on streaming filter calls

2011-04-22 Thread Josiah Carlson
Okay, fresh, new interesting error code.

Content:

POST /1/statuses/filter.json HTTP/1.1
Host: stream.twitter.com
Accept-Encoding: identity
Content-Length: 30
Authorization: OAuth 
realm="http://stream.twitter.com/1/statuses/filter.json";, 
oauth_consumer_key="...", oauth_nonce="974a1fadf2801d4de226e77ae556d10e", 
oauth_signature="UClAObS6oZ7ZQU9HcNgqB%2BWnV9U%3D", 
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1303517305", 
oauth_token="..., oauth_version="1.0"

delimited=length&track=twitter

The response:
HTTP/1.1 406 Not Acceptable
Content-Type: text/html; charset=iso-8859-1
Transfer-Encoding: chunked
Server: Jetty(6.1.25)


... Anyone have any idea what is the "Not Acceptable" part of the request? 
This code used to work :/

Thanks,
 - Josiah

-- 
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


[twitter-dev] /1/lists/show doesn't work when given a list slug

2011-04-22 Thread Craig Walls

Per this announcement: 
http://groups.google.com/group/twitter-api-announce/browse_thread/thread/6f734611ac57e281?pli=1

I'm changing my code to use the new routes. When I do something like:

https://api.twitter.com/1/lists/show.json?list_id={list ID}
&screen_name={screen name} or 
https://api.twitter.com/1/lists/show.json?list_id={list
ID}&user_id={user ID}

...it works fine. In fact, it seems that the screen_name and user_id
are optional when using a list ID (because the list ID is unique on
its own?).

But if I do this...

https://api.twitter.com/1/lists/show.json?slug={slug}&screen_name={screen
name} or https://api.twitter.com/1/lists/show.json?slug={slug}&user_id={user
ID}

...it doesn't work. I've tried it for several different list slugs,
both public and private, and no dice. Every time I get an HTTP 400
response.

Per that announcement, shouldn't it work if I give it the list slug
and either a user ID or screen name?

-- 
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] i just want to automate status tweets using one twitter account...

2011-04-22 Thread Cartmetrix
Here's a simple tutorial I wrote to do just that:

http://www.mediabistro.com/alltwitter/getting-started-with-the-twitter-api_b7427



On Apr 21, 2011, at 7:45 PM, wilbcorp  wrote:

> i have a twitter account...  i have a registered app with twitter...
> all i want to do is automatically post status updates to my twitter
> account using PHP...  unfortunately, i've gone through numerous
> tutorials that don't seem to function...  to be clear, i don't want to
> create an app that allows other users to post to their accounts, i
> only want to post to my twitter account.
> 
> can anyone help me get started?
> 
> thanks
> 
> -- 
> 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

-- 
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] i just want to automate status tweets using one twitter account...

2011-04-22 Thread Unpaid Intern
great...  i'll give 'em a shot.  thanks so much for your help.

- j

Sent from my email

On Apr 22, 2011, at 11:07 AM, Adam Green wrote:

> Another tutorial you can try for posting tweets with PHP and a single account 
> is:
> http://140dev.com/twitter-api-programming-tutorials/hello-twitter-oauth-php/
> 
> On Fri, Apr 22, 2011 at 10:47 AM, Taylor Singletary 
>  wrote:
> Hi There,
> 
> We have a article that helps point you in the right direction for this 
> scenario -- you still need to implement some of OAuth, but we simplify a 
> number of the token negotiation steps for you:
> 
> http://dev.twitter.com/pages/oauth_single_token
> 
> After creating an application, you can retrieve the access token (credentials 
> that identify you as your user to Twitter from your application) from 
> dev.twitter.com, which combined with your API key and secret is everything 
> you need to make authenticated requests with Twitter -- like posting statuses.
> 
> @episod - Taylor Singletary
> 
> 
> On Thu, Apr 21, 2011 at 5:45 PM, wilbcorp  wrote:
> i have a twitter account...  i have a registered app with twitter...
> all i want to do is automatically post status updates to my twitter
> account using PHP...  unfortunately, i've gone through numerous
> tutorials that don't seem to function...  to be clear, i don't want to
> create an app that allows other users to post to their accounts, i
> only want to post to my twitter account.
> 
> can anyone help me get started?
> 
> thanks
> 
> --
> 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
> 
> 
> -- 
> 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
> 
> 
> 
> -- 
> Adam Green
> Twitter API Consultant and Analyst
> http://140dev.com, @140dev
> http://2012twit.com, @2012twit
> 781-879-2960
> 
> -- 
> 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

-- 
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] i just want to automate status tweets using one twitter account...

2011-04-22 Thread Adam Green
Another tutorial you can try for posting tweets with PHP and a single
account is:
http://140dev.com/twitter-api-programming-tutorials/hello-twitter-oauth-php/

On Fri, Apr 22, 2011 at 10:47 AM, Taylor Singletary <
taylorsinglet...@twitter.com> wrote:

> Hi There,
>
> We have a article that helps point you in the right direction for this
> scenario -- you still need to implement some of OAuth, but we simplify a
> number of the token negotiation steps for you:
>
> http://dev.twitter.com/pages/oauth_single_token
>
> After creating an application, you can retrieve the access token
> (credentials that identify you as your user to Twitter from your
> application) from dev.twitter.com, which combined with your API key and
> secret is everything you need to make authenticated requests with Twitter --
> like posting statuses.
>
> @episod  - Taylor Singletary
>
>
> On Thu, Apr 21, 2011 at 5:45 PM, wilbcorp wrote:
>
>> i have a twitter account...  i have a registered app with twitter...
>> all i want to do is automatically post status updates to my twitter
>> account using PHP...  unfortunately, i've gone through numerous
>> tutorials that don't seem to function...  to be clear, i don't want to
>> create an app that allows other users to post to their accounts, i
>> only want to post to my twitter account.
>>
>> can anyone help me get started?
>>
>> thanks
>>
>> --
>> 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
>>
>
>  --
> 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
>



-- 
Adam Green
Twitter API Consultant and Analyst
http://140dev.com, @140dev
http://2012twit.com, @2012twit
781-879-2960

-- 
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


[twitter-dev] Re: Streaming API 420 error

2011-04-22 Thread Josiah Carlson
A small update...

After letting it rest over night, I was able to get /statuses/filter.json to 
work on my office machine using any set of keys, but attempting to run with 
any keys on ec2 gets us a 420. Immediately after the 420 in ec2, I can run 
without issue in the office. I've tried a few of our different hosts in ec2, 
but they all seem to get a 420 error.

 - Josiah

-- 
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] i just want to automate status tweets using one twitter account...

2011-04-22 Thread Taylor Singletary
Hi There,

We have a article that helps point you in the right direction for this
scenario -- you still need to implement some of OAuth, but we simplify a
number of the token negotiation steps for you:

http://dev.twitter.com/pages/oauth_single_token

After creating an application, you can retrieve the access token
(credentials that identify you as your user to Twitter from your
application) from dev.twitter.com, which combined with your API key and
secret is everything you need to make authenticated requests with Twitter --
like posting statuses.

@episod  - Taylor Singletary


On Thu, Apr 21, 2011 at 5:45 PM, wilbcorp  wrote:

> i have a twitter account...  i have a registered app with twitter...
> all i want to do is automatically post status updates to my twitter
> account using PHP...  unfortunately, i've gone through numerous
> tutorials that don't seem to function...  to be clear, i don't want to
> create an app that allows other users to post to their accounts, i
> only want to post to my twitter account.
>
> can anyone help me get started?
>
> thanks
>
> --
> 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
>

-- 
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] How to create a website using twitter on a local machine?

2011-04-22 Thread Peter Denton
There is a bitly.com URL which redirects to localhost. I don't have it on hand 
but you can google it.

On Apr 22, 2011, at 12:02 AM, kite <68...@supinfo.com> wrote:

> Hello,
> 
> I want to create a website using the twitter API (through linq to
> twitter) for schooling purpose, but I do not have a server to host it.
> 
> How can I still make my application work when running locally? I can't
> fill the "website url" and "callback url" since I host the site on my
> own computer, on my local network.
> 
> Cordially,
> 
> KiTe
> 
> -- 
> 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

-- 
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


[twitter-dev] Search API bug? (strange results)

2011-04-22 Thread Brian Medendorp
I wanted to get some counts for a number of domains, so I wrote a
simple script to perform a search with a domain name and loop through
all of the pages, counting up the number of results. This works fine
usually, but I have discovered that occasionally, the API returns
rather strange results:

?rpp=100&q=disney.com
?page=2&max_id=61422857900670976&rpp=100&q=disney.com
?page=3&max_id=61422857900670976&rpp=100&q=disney.com
?page=4&max_id=61422857900670976&rpp=100&q=disney.com
?page=5&max_id=61422857900670976&rpp=100&q=disney.com

content:
{"results":[],"max_id":-1,"since_id":0,"results_per_page":15,"page":
1,"completed_in":
1.532267,"since_id_str":"0","max_id_str":"-1","query":"disney.com"}

You'll notice that the results array is empty, the max_id is set to
-1, the results_per_page doesn't match what I specified, and the page
is set to 1 (and in that example it should have been page 5).

If I retry the URL, it usually works, so I made a work-around to
detect a max_id=-1 and retry the API call, but this seems like an
actual bug in the API (and the work-around will inflate the rate-
limit).

-- 
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


[twitter-dev] integrate twitter into my web site

2011-04-22 Thread Pravin
i want to know how can i store the twitters login detail into
SESSION . so that i can take that details and redirects to my web
site.
when i click on 'sign in with twitter', it take me to login page of
twitter where i put my login details.As soon as click on login button
it redirects me to OUTHO_CALLBACK URL which i set as home page of my
site.But it only redirects me on Home page not getting stored the
login details of twitter.

Can i store the username field of twitter into session.Because we are
storing the email id into session on login page.please point me at
right direction

-- 
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


[twitter-dev] How to create a website using twitter on a local machine?

2011-04-22 Thread kite
Hello,

I want to create a website using the twitter API (through linq to
twitter) for schooling purpose, but I do not have a server to host it.

How can I still make my application work when running locally? I can't
fill the "website url" and "callback url" since I host the site on my
own computer, on my local network.

Cordially,

KiTe

-- 
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


[twitter-dev] Streaming API 420 error

2011-04-22 Thread Josiah Carlson
Hello,

We've been using some of the streaming API (specifically 
/statuses/filter.json and occasionally /statuses/sample.json), and recently 
I have noticed that we are seeing only 420 errors from our auth tokens for 
all of our dev, staging, and prod applications. Two sets of those auth 
tokens are never used for streaming unless I run them manually, sometimes 
with an hour between tests.

status.twitter.com says that there *was* a streaming error, but it was 
resolved. Anyone else having issues?

Thank you,
 - Josiah

-- 
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