[twitter-dev] Re: retweeted variable in home timeline

2010-09-02 Thread p r
thanks for the answer, retweeted_by_me gets only the retweeted
statuses. to show in regular timelines the retweeted statuses is the
variable retweeted the best way. i will waiting until the problems
solved.
greetings

On 1 Sep., 03:32, Matt Harris thematthar...@twitter.com wrote:
 Hey p r,

 The retweeted status is currently disabled whilst we look into some
 issues with it. At the moment the best way to know if a Tweet has been
 retweeted by you is to call /statuses/retweeted_by_me and compare the
 status IDs with those in your home timeline.

 More information on retweeted_by_me can be found on our developer
 resources site:
    http://dev.twitter.com/doc/get/statuses/retweeted_by_me

 We'll post updates to this developer list and on @twitterapi when the
 fields are re-enabled.

 Best,
 Matt

 On Tue, Aug 31, 2010 at 5:08 AM, p r perab...@googlemail.com wrote:
  Hello,

  i receive per api my timeline and i want to show when the tweets
  retweeted by me. But the variable retweeted in every status is always
  empty. What is wrong, has everyone similar experiences?
  greetings

  --
  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?hl=en

 --

 Matt Harris
 Developer Advocate, Twitterhttp://twitter.com/themattharris

-- 
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?hl=en


[twitter-dev] Re: Automated OAuth

2010-09-02 Thread Cradash
A Java example is unnecessary, more to the point I basically just need
to figure out how it can be done.

On Sep 2, 3:40 pm, Cradash rand...@gmail.com wrote:
 We are a bit late to the game and haven't migrated to Oauth and now
 are scrambling to do so, we're running some Automated tweets (we get
 the info and put it in a Twitter stream). I haven't found any examples
 of how to authorize an automated stream and was wondering in anyone
 had any suggestions . It's written in Scala but all I would need is a
 Java example.

-- 
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?hl=en


[twitter-dev] Re: oauth echo php sample

2010-09-02 Thread sdenike
This is the header I am sending.

X-Verify-Credentials-Authorization: OAuth realm=http://
api.twitter.com,  oauth_consumer_key=KEY,  oauth_token=TOKEN,
oauth_signature_method=HMAC-SHA1,  oauth_signature=SIG,
oauth_timestamp=1283409844,  oauth_nonce=NONCE,
oauth_version=1.0 X-Auth-Service-Provide:
https://api.twitter.com/1/account/verify_credentials.json

I am getting all the information that I am sending back from using the
PHP getallheaders(); function and parsing out aspects of it.  When I
send that header via curl I am constantly getting

{request:/1/account/verify_credentials.json,error:Could not
authenticate you.}

I have even tested with a simple REST plugin for chrome, which always
prompts for a username/password combo. Given what I am trying to do
this will not be possible to send a user/password as that is
essentially what I am trying to get sent back to me via twitter.  Can
anyone lend some insight on how I can get authed in to obtain the user
information?  Thanks



On Sep 1, 5:02 pm, sdenike den...@gmail.com wrote:
 Does anyone have a sample header that should be sent back to twitter
 as well as maybe the curl commands?  I have been trying to construct a
 header to send back to twitter using OAuth echo, but have not been
 successful in doing so.  And example would be excellent if anyone is
 able to provide.  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?hl=en


[twitter-dev] Re: Basic Auth

2010-09-02 Thread Cradash
Ah, thanks for the links, we were caught a bit off guard with Oauth.

On Sep 2, 12:35 am, Marc Mims marc.m...@gmail.com wrote:
 * Cradash rand...@gmail.com [100901 06:40]:

  We have been getting a {errors:[{code:53,message:Basic
  authentication is not supported}]} error on our feeds for the last 15
  or so hours, our feeds tweet at most 5 times an hour but have become
  inactive because of this error. We are using Jtwitter and have not had
  an isssue with this untill half-a day ago.

 I've been seeing this message for suspended users.  See my most recent
 post in this 
 thread:http://groups.google.com/group/twitter-development-talk/browse_thread...

 Here's a shortened URL:http://is.gd/eONAH

 An unauthenticated call to users/show for that user may tell you what
 the real problem is.

         -Marc

-- 
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?hl=en


[twitter-dev] Re: t.co Rollout

2010-09-02 Thread Rich
Please Twitter can you give us an update on how character counts will
work

Personally the only way I see it making sense is if it's still 140 for
us and you change it after. Users will not understand when a character
count wildly jumps when typing and will assume the app is broken.

Also you've decided to change the users tweet and so surely the
character count should reflect the users tweet itself?

On Sep 2, 5:41 am, M. Edward (Ed) Borasky zn...@borasky-
research.net wrote:
 My recollection is that the character count question was discussed on  
 this list, but I don't remember the number.
 --
 M. Edward (Ed) Boraskyhttp://borasky-research.nethttp://twitter.com/znmeb

 A mathematician is a device for turning coffee into theorems. - Paul Erdos

 Quoting John Meyer john.l.me...@gmail.com:



  On 9/1/2010 9:34 PM, M. Edward (Ed) Borasky wrote:
  I just got an email from Twitter about oAuth and t.co. Given that I have
  about five accounts, I assume I will get more copies. ;-) Anyhow, in the
  section on t.co, there was this line:

  You will start seeing these links on certain accounts that have
  opted-in to
  the service

  And in a related question, exactly how is this going to affect
  character count?  Will it be based on the bit.ly URL, or the t.co URL?

  --
  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?hl=en

-- 
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?hl=en


[twitter-dev] Re: Status update results in Internal server error 500

2010-09-02 Thread Papa.Coen
Thank you for your support. I saw you message a little too late, but
was indeed the problem!

Again: thanks a bunch.

Coen


On Sep 1, 5:00 pm, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Looking at some of your example debug output above, you're sending a
 Content-Type header of text/xml when you aren't sending us XML, you're
 sending us x-www-form-urlencoded data.

 Taylor

 On Wed, Sep 1, 2010 at 7:38 AM, Papa.Coen papa.c...@gmail.com wrote:
  And now for something strange:

  I get the same 500 response _regardless_ of what I put in the body.
  Also when the data in the Signature base string is different from what
  is used in the body. So not even a '401 unauthorized' message...

  At first I suspected the(/my) signature, but now I have doubts. Lots
  of them. And still no solution...

  --
  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?hl=en

-- 
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?hl=en


[twitter-dev] Re: Authentication on opening Twitter.com in browser

2010-09-02 Thread qip-er
Hello, Matt.

 This would require the application to know the users credentials -
Why? We already have authorized tokens. When authorized application is
making requests to Twitter API your (Twitter) engine is know which
user the application is on behalf of.
So Twitter could give us a one-time token to open in a web browser.

For example, I have a friend whose page is closed for non-friends.
That's why to open Following page I need to be authenticated, for
example that way:

sent to Twitter:
GET /oauth/get_website_token HTTP/1.1
Authorization: OAuth ...
...

received from Twitter:
HTTP/1.1 200 OK

web_token=a7b078a62c1123a79e2c06ca37541a5a298d

Now I can open a link in a browser:
http://twitter.com/NotAPublicPerson/following?web_token=a7b078a62c1123a79e2c06ca37541a5a298d
When the user will open this link in a browser he/she will
automatically logged in, and a specified web_token will be expired.

Any cons of such a method?

-- 
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?hl=en


Re: [twitter-dev] Re: Authentication on opening Twitter.com in browser

2010-09-02 Thread Matt Harris
Whilst this would work it would provide a way for developers to take
over a users account. The tokens you have allow you to carry out
actions on behalf of the user, they don't mean you can become the user
(which would be possible using the method you suggest).

I understand your reasoning but there if such a mechanism were in
place any developer could run the 'generate web token' method on their
users and then log in as any one of them.

Does that help explain why this wouldn't be allowed.
Best,
Matt

On Thu, Sep 2, 2010 at 12:58 AM, qip-er qip.o@googlemail.com wrote:
 Hello, Matt.

 This would require the application to know the users credentials -
 Why? We already have authorized tokens. When authorized application is
 making requests to Twitter API your (Twitter) engine is know which
 user the application is on behalf of.
 So Twitter could give us a one-time token to open in a web browser.

 For example, I have a friend whose page is closed for non-friends.
 That's why to open Following page I need to be authenticated, for
 example that way:

sent to Twitter:
 GET /oauth/get_website_token HTTP/1.1
 Authorization: OAuth ...
 ...

 received from Twitter:
 HTTP/1.1 200 OK

 web_token=a7b078a62c1123a79e2c06ca37541a5a298d

 Now I can open a link in a browser:
 http://twitter.com/NotAPublicPerson/following?web_token=a7b078a62c1123a79e2c06ca37541a5a298d
 When the user will open this link in a browser he/she will
 automatically logged in, and a specified web_token will be expired.

 Any cons of such a method?

 --
 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?hl=en




-- 


Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris

-- 
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?hl=en


[twitter-dev] Insufficient feedback with read only @anywhere apps

2010-09-02 Thread jaronbarends
I just spent some time figuring out why I was getting a 401 -
Unauthorized error when trying to post tweets from an @anywhere
tweetBox. Turns out I had forgotten to check the Read  Write radio
button in my app settings. (And it even says Note: @Anywhere
applications require read  write access.)

The tweetbox didn't give me any feedback - the only thing I saw was
the spinner that kept on spinning.

Apperently, if your app is Readonly, @anywhere will let you include
write-components anyhow. It would be nice if the @anywhere api would
display a message telling you that your app needs to be Read  Write,
instead of showing a non-working component. Or, at the least, show
some kind of error when you're trying to post a tweet.

-- 
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?hl=en


[twitter-dev] Re: Automated OAuth

2010-09-02 Thread Cradash
xAuth perhaps?

On Sep 2, 4:28 pm, Cradash rand...@gmail.com wrote:
 A Java example is unnecessary, more to the point I basically just need
 to figure out how it can be done.

 On Sep 2, 3:40 pm, Cradash rand...@gmail.com wrote:

  We are a bit late to the game and haven't migrated to Oauth and now
  are scrambling to do so, we're running some Automated tweets (we get
  the info and put it in a Twitter stream). I haven't found any examples
  of how to authorize an automated stream and was wondering in anyone
  had any suggestions . It's written in Scala but all I would need is a
  Java example.

-- 
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?hl=en


[twitter-dev] Re: Error 401 only in Target (working fine in simulator)

2010-09-02 Thread Karthik
Thanks you all ...Actually the problem with the API which I am
using to get the target mobile time.
The API always returns local time  when I change it to GMT The
things are fine in target.

Thanks once again for this timely help on Time...

On Sep 2, 4:45 am, Andrew W. Donoho andrew.don...@gmail.com wrote:
 On Sep 1, 2010, at 15:55 , M. Edward (Ed) Borasky wrote:

  That's a surprise - I'd expect Apple to be on top of stuff like that! Even 
  so, 18 seconds is well within Twitter's outrageously generous tolerance of 
  five minutes.

 There are different sync. points for different devices. For example, iPhones 
 sync with ATT. iPads sync with Apple. There appears to be a ≈30 second 
 difference between them. While being far from a time sync expert, I suspect 
 leap seconds are the issue.

 Anon,
 Andrew
 
 Andrew W. Donoho
 Donoho Design Group, L.L.C.
 a...@ddg.com, +1 (512) 750-7596

 We did not come to fear the future.
     We came here to shape it.

 -- President Barack Obama, Sept. 2009

-- 
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?hl=en


[twitter-dev] Re: t.co Rollout

2010-09-02 Thread Nik Fletcher
I don't know the answer to the first few items, but I'm guessing that
the URLs will be unwrapped to whatever was originally submitted to
Twitter (i.e. whatever's currently shown when using the REST API
timelines with ?include_entities=true in the parameters)

-N

--
@nikf

On Sep 2, 4:34 am, M. Edward (Ed) Borasky zn...@borasky-
research.net wrote:
 I just got an email from Twitter about oAuth and t.co. Given that I  
 have about five accounts, I assume I will get more copies. ;-) Anyhow,  
 in the section on t.co, there was this line:

 You will start seeing these links on certain accounts that have opted-in to
 the service

 How does an account opt-in to t.co? Will there be a setting in the  
 web app, similar to opting-in to locations? Will there be an API call,  
 or will Twitter simply wrap all the links posted by an account that  
 has opted in?

 If I post a bit.ly link and Twitter wraps it via t.co, will the  
 unwrapped display unwrap just the t.co piece, or will it go all the  
 way down to the raw URL?

 --
 M. Edward (Ed) Boraskyhttp://borasky-research.nethttp://twitter.com/znmeb

 A mathematician is a device for turning coffee into theorems. - Paul Erdos

-- 
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?hl=en


Re: [twitter-dev] Re: Automated OAuth

2010-09-02 Thread Tom van der Woerdt
Don't worry, you'll get your answer, and if not then you'll just have to
wait until my school is over (which is now).

Anyway, to answer your question: Yes, you may like to use xAuth to
convert all username/password combinations to OAuth credentials. For new
users you should simply do the OAuth Dance. You can then use these
credentials to make the requests to the API.

Tom


On 9/2/10 12:00 PM, Cradash wrote:
 xAuth perhaps?
 
 On Sep 2, 4:28 pm, Cradash rand...@gmail.com wrote:
 A Java example is unnecessary, more to the point I basically just need
 to figure out how it can be done.

 On Sep 2, 3:40 pm, Cradash rand...@gmail.com wrote:

 We are a bit late to the game and haven't migrated to Oauth and now
 are scrambling to do so, we're running some Automated tweets (we get
 the info and put it in a Twitter stream). I haven't found any examples
 of how to authorize an automated stream and was wondering in anyone
 had any suggestions . It's written in Scala but all I would need is a
 Java example.
 

-- 
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?hl=en


Re: [twitter-dev] Twitter oAuth

2010-09-02 Thread Edward J. Yoon
Thanks.

BTW, basic auth seems still available on some applications (e.g.,
http://twtkr.com/index.php ). I just wondered whether there is a way
to verify id/password via OAuth.

On Thu, Sep 2, 2010 at 6:10 AM, Matt Harris thematthar...@twitter.com wrote:
 Hey Edward,

 Basic Auth on the REST API was disabled August 31st. All authenticated
 requests to the REST API (anything on http://api.twitter.com) need to
 use OAuth. There is more information on our developer resources site:
    http://dev.twitter.com/pages/basic_to_oauth

 Hope that helps,
 Matt

 On Tue, Aug 31, 2010 at 8:07 PM, Edward J. Yoon edwardy...@apache.org wrote:
 Is it still possible to login using username/password? then, how can I
 program it?

 --
 Best Regards, Edward J. Yoon
 edwardy...@apache.org
 http://blog.udanax.org

 --
 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?hl=en




 --


 Matt Harris
 Developer Advocate, Twitter
 http://twitter.com/themattharris

 --
 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?hl=en




-- 
Best Regards, Edward J. Yoon
edwardy...@apache.org
http://blog.udanax.org

-- 
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?hl=en


[twitter-dev] Re: t.co Rollout

2010-09-02 Thread Boaz
Different question on the same email that states that Twitter will
start tracking every t.co click, whether on twitter.com or a Twitter
app. Does anyone know if Twitter will update their API to allow us to
get the Twitter Update ID that referred a particular click?

Thanks,
Boaz


On Sep 1, 8:34 pm, M. Edward (Ed) Borasky zn...@borasky-
research.net wrote:
 I just got an email from Twitter about oAuth andt.co. Given that I  
 have about five accounts, I assume I will get more copies. ;-) Anyhow,  
 in the section ont.co, there was this line:

 You will start seeing these links on certain accounts that have opted-in to
 the service

 How does an account opt-in tot.co? Will there be a setting in the  
 web app, similar to opting-in to locations? Will there be an API call,  
 or will Twitter simply wrap all the links posted by an account that  
 has opted in?

 If I post a bit.ly link and Twitter wraps it viat.co, will the  
 unwrapped display unwrap just thet.copiece, or will it go all the  
 way down to the raw URL?

 --
 M. Edward (Ed) Boraskyhttp://borasky-research.nethttp://twitter.com/znmeb

 A mathematician is a device for turning coffee into theorems. - Paul Erdos

-- 
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?hl=en


[twitter-dev] Tracking t.co clicks

2010-09-02 Thread Boaz
Just received an email titled Twitter Apps and You. In the email,
Twitter says that when you click on [t.co] links from Twitter.com or
a Twitter application, Twitter will log that click. We hope to use
this data to provide better and more relevant content to you over
time.

Any idea if Twitter will enhance the API to obtain the status id that
referred the click?

-- 
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?hl=en


[twitter-dev] Connevct to another users application

2010-09-02 Thread Frank P
Hi There,

I am a website builder and used a Twitter API to update a Twitter
status when a webaster wrote a new newsitem on his site. Now I have to
rewrite the api to use oAUTH. I got it working but is it possible to
register the application once and let other users make use of that
application.

I think I need the access token and the ouath token secret  of that
user to connect. But I can't find those keys in the users profile.

Hope someone can help me.

Thanks,
Frank

-- 
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?hl=en


Re: [twitter-dev] Twitter oAuth

2010-09-02 Thread Cameron Kaiser
 BTW, basic auth seems still available on some applications (e.g.,
 http://twtkr.com/index.php ). I just wondered whether there is a way
 to verify id/password via OAuth.

Those apps are probably using xAuth.

-- 
 personal: http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com
-- Diamonds are forever. --

-- 
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?hl=en


[twitter-dev] Re: Automated OAuth

2010-09-02 Thread Stuie Wakefield
I also have this issue with one of my applications. We are using an
automated twitter account to post updates as a Twitter feed. The OAuth
authentication process requires a user to be redirected to Twitter to
enter the username and password to authorize a request token in order
to provide controlled access to an application while keeping the
user's credentials secure. For these type of accounts we know the
username and password and so the OAuth process is superfluous in these
circumstances. The only way I can think of to do this, after Basic
Authentication is removed, feels a bit dirty but is as follows:

1) Call the request_token API method using the consumer keys
2) HTTP GET the authorize API method using the request tokens
3) Regex the resulting response to extract form variables and tokens
4) HTTP POST the action parameter of the form (make sure follow
redirects is on) including the extracted form variables, the username
and the password
5) Extract returned parameters from the response
6) Follow the remainder of the OAuth process

Is there a better method for doing this?

-- 
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?hl=en


[twitter-dev] xAuth support

2010-09-02 Thread Rajat
Hi,

I have just received an e-mail that Starting August 31, all
applications will be required to use “OAuth” to access your Twitter
account.

Wondering if there is any impact on xAuth and whether xAuth is still
supported? Any info on this will be much appreciated.

Thanks,
Rajat

-- 
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?hl=en


Re: [twitter-dev] xAuth support

2010-09-02 Thread Cameron Kaiser
 I have just received an e-mail that Starting August 31, all
 applications will be required to use _OAuth_ to access your Twitter
 account.
 
 Wondering if there is any impact on xAuth and whether xAuth is still
 supported? Any info on this will be much appreciated.

xAuth is still supported.

-- 
 personal: http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com
-- Happiness is having a scratch for every itch. -- Ogden Nash 

-- 
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?hl=en


[twitter-dev] Oauth for VBA?

2010-09-02 Thread brendanh
Hi,
My Excel RSS import is broken since basic auth shutdown -  getting a
basic authentication is not supported error.  Is there any VBA code
for Oauth yet, or any information about how to go about writing some?

-- 
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?hl=en


[twitter-dev] How can I install twurl's patch??

2010-09-02 Thread Andrea Stagi
Hi everybody,

I tried to install the twurl's patch...I think I'm wrong..What are the
right steps to install it??

Thank you all..!!

-- 
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?hl=en


Re: [twitter-dev] Connevct to another users application

2010-09-02 Thread John Meyer

On 9/2/2010 2:48 AM, Frank P wrote:

Hi There,

I am a website builder and used a Twitter API to update a Twitter
status when a webaster wrote a new newsitem on his site. Now I have to
rewrite the api to use oAUTH. I got it working but is it possible to
register the application once and let other users make use of that
application.

I think I need the access token and the ouath token secret  of that
user to connect. But I can't find those keys in the users profile.



When you initially get the user to authorize your website/application, 
you receive back the token combo.  You then need to store those 
somewhere (database, cookie, etc) for subsequent authorizations.


--
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?hl=en


Re: [twitter-dev] Using oAuth by Curl

2010-09-02 Thread Taylor Singletary
That's an odd exception for Twurl to throw -- it means it was unable
to initialize itself with components that should have been present within
the library itself.

With what method did you install Twurl? Rubygems? What version of Ruby are
you running?

Another approach to using Twurl is to clone the repository from
http://github.com/marcel/twurl and add the twurl/bin directory to
your environment PATH.

Taylor

On Wed, Sep 1, 2010 at 7:36 PM, Andrea Stagi stagi.and...@gmail.com wrote:

 Hi,

 I'm developing a twitter client using curl...Yesterday twitter closed
 the basic authentication, replacing it with oAuth..I really need help
 for it! I have to convert my application now, I tried to use twurl but
 I receive this error:

 /var/lib/gems/1.8/gems/twurl-0.6.1/bin/../lib/twurl/
 authorization_controller.rb:2: uninitialized constant
 Twurl::AbstractCommandController

 An application's bug? An error of mine?

 There are any alternatives??

 Thank you all...

 p.s. I've just registered my application, so I have all keys needed...

 --
 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?hl=en


-- 
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?hl=en


[twitter-dev] How to obtain latest tweet

2010-09-02 Thread stef
I've been asked to display the latest tweet of one certain twitter
account on that person's website. I understand one has to use OAuth. I
have added an application in the twitter account and have obtained all
the various tokens.

The documentation seems to talk a lot about authenticating users but
AFAIK this is not required if I simply want to display one tweet,
which is public anyway. Even the rss feed can not longer be accessed
with OAuth ?

What is the easiest way to just display the latest tweet on a site,
using php?

-- 
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?hl=en


[twitter-dev] posting with PHP

2010-09-02 Thread Robertvlienden
Hello!

I have a question,
I want to programm a simple twitter BOT that shouts some quote's and
things like the time.
But, by today my test script doesnt work!

This is the script:

?php
// Set username and password
$username = 'rvlienden_bot';
$password = '***';
// The message you want to send
$message = 'a twitter API test';
// The twitter API address
$url = 'http://twitter.com/statuses/update.xml';
// Alternative JSON version
// $url = 'http://twitter.com/statuses/update.json';
// Set up and execute the curl process
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, $url);
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, status=$message);
curl_setopt($curl_handle, CURLOPT_USERPWD, $username:$password);
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
// check for success or failure
if (empty($buffer)) {
echo 'message';
} else {
echo 'success';
}
?

Can you help me?

Greetings,
Robert

-- 
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?hl=en


[twitter-dev] Re: Using oAuth by Curl

2010-09-02 Thread Andrea Stagi
Ok thanks for reply...I tried many methods and I think cloning
approach too..Could you show me the right passages using the command
line?

Thanks a lot,

Best

On Sep 2, 4:16 pm, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 That's an odd exception for Twurl to throw -- it means it was unable
 to initialize itself with components that should have been present within
 the library itself.

 With what method did you install Twurl? Rubygems? What version of Ruby are
 you running?

 Another approach to using Twurl is to clone the repository 
 fromhttp://github.com/marcel/twurland add the twurl/bin directory to
 your environment PATH.

 Taylor



 On Wed, Sep 1, 2010 at 7:36 PM, Andrea Stagi stagi.and...@gmail.com wrote:
  Hi,

  I'm developing a twitter client using curl...Yesterday twitter closed
  the basic authentication, replacing it with oAuth..I really need help
  for it! I have to convert my application now, I tried to use twurl but
  I receive this error:

  /var/lib/gems/1.8/gems/twurl-0.6.1/bin/../lib/twurl/
  authorization_controller.rb:2: uninitialized constant
  Twurl::AbstractCommandController

  An application's bug? An error of mine?

  There are any alternatives??

  Thank you all...

  p.s. I've just registered my application, so I have all keys needed...

  --
  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?hl=en

-- 
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?hl=en


Re: [twitter-dev] posting with PHP

2010-09-02 Thread Tom van der Woerdt
These scripts (Basic Authentication) were blocked a few days ago. You
should use OAuth.

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

Tom


On 9/2/10 4:16 PM, Robertvlienden wrote:
 Hello!
 
 I have a question,
 I want to programm a simple twitter BOT that shouts some quote's and
 things like the time.
 But, by today my test script doesnt work!
 
 This is the script:
 
 ?php
 // Set username and password
 $username = 'rvlienden_bot';
 $password = '***';
 // The message you want to send
 $message = 'a twitter API test';
 // The twitter API address
 $url = 'http://twitter.com/statuses/update.xml';
 // Alternative JSON version
 // $url = 'http://twitter.com/statuses/update.json';
 // Set up and execute the curl process
 $curl_handle = curl_init();
 curl_setopt($curl_handle, CURLOPT_URL, $url);
 curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
 curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
 curl_setopt($curl_handle, CURLOPT_POST, 1);
 curl_setopt($curl_handle, CURLOPT_POSTFIELDS, status=$message);
 curl_setopt($curl_handle, CURLOPT_USERPWD, $username:$password);
 $buffer = curl_exec($curl_handle);
 curl_close($curl_handle);
 // check for success or failure
 if (empty($buffer)) {
 echo 'message';
 } else {
 echo 'success';
 }
 ?
 
 Can you help me?
 
 Greetings,
 Robert
 

-- 
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?hl=en


Re: [twitter-dev] How to obtain latest tweet

2010-09-02 Thread M. Edward (Ed) Borasky
I don't know the PHP, but the call does *not* require authentication  
if you are willing to live with 150 API calls per hour. It's GET  
users/show


http://dev.twitter.com/doc/get/users/show

The last tweet (if there is one) will be an embedded status object.  
At the same cost of 150 unauthenticated API calls per hour, you can  
pick up the most recent 200 tweets with GET statuses/user_timeline


http://dev.twitter.com/doc/get/statuses/user_timeline

The default is 20 tweets, but you can get as many as 200 per call by  
using the count parameter.


--
M. Edward (Ed) Borasky
http://borasky-research.net http://twitter.com/znmeb

A mathematician is a device for turning coffee into theorems. - Paul Erdos


Quoting stef stefankend...@gmail.com:


I've been asked to display the latest tweet of one certain twitter
account on that person's website. I understand one has to use OAuth. I
have added an application in the twitter account and have obtained all
the various tokens.

The documentation seems to talk a lot about authenticating users but
AFAIK this is not required if I simply want to display one tweet,
which is public anyway. Even the rss feed can not longer be accessed
with OAuth ?

What is the easiest way to just display the latest tweet on a site,
using php?

--
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?hl=en






--
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?hl=en


[twitter-dev] Re: posting with PHP

2010-09-02 Thread Robertvlienden
Is there a source that I can use as example?

On 2 sep, 16:37, Tom van der Woerdt i...@tvdw.eu wrote:
 These scripts (Basic Authentication) were blocked a few days ago. You
 should use OAuth.

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

 Tom

 On 9/2/10 4:16 PM, Robertvlienden wrote:



  Hello!

  I have a question,
  I want to programm a simple twitter BOT that shouts some quote's and
  things like the time.
  But, by today my test script doesnt work!

  This is the script:

  ?php
  // Set username and password
  $username = 'rvlienden_bot';
  $password = '***';
  // The message you want to send
  $message = 'a twitter API test';
  // The twitter API address
  $url = 'http://twitter.com/statuses/update.xml';
  // Alternative JSON version
  // $url = 'http://twitter.com/statuses/update.json';
  // Set up and execute the curl process
  $curl_handle = curl_init();
  curl_setopt($curl_handle, CURLOPT_URL, $url);
  curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
  curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($curl_handle, CURLOPT_POST, 1);
  curl_setopt($curl_handle, CURLOPT_POSTFIELDS, status=$message);
  curl_setopt($curl_handle, CURLOPT_USERPWD, $username:$password);
  $buffer = curl_exec($curl_handle);
  curl_close($curl_handle);
  // check for success or failure
  if (empty($buffer)) {
      echo 'message';
  } else {
      echo 'success';
  }
  ?

  Can you help me?

  Greetings,
  Robert

-- 
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?hl=en


[twitter-dev] Re: Using oAuth by Curl

2010-09-02 Thread Marsh Gardiner
You might try Apigee's test console for the Twitter API:
http:/app.apigee.com/console/twitter

If you do, let us know how it works for you. We're always interested
in feedback on how to make it better!

Thanks,

Marsh

On Sep 1, 10:36 pm, Andrea Stagi stagi.and...@gmail.com wrote:
 Hi,

 I'm developing a twitter client using curl...Yesterday twitter closed
 the basic authentication, replacing it with oAuth..I really need help
 for it! I have to convert my application now, I tried to use twurl but
 I receive this error:

 /var/lib/gems/1.8/gems/twurl-0.6.1/bin/../lib/twurl/
 authorization_controller.rb:2: uninitialized constant
 Twurl::AbstractCommandController

 An application's bug? An error of mine?

 There are any alternatives??

 Thank you all...

 p.s. I've just registered my application, so I have all keys needed...

-- 
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?hl=en


[twitter-dev] Re: Please help: Easy way to do Oauth/xAuth from VBA?

2010-09-02 Thread brendanh
Has anyone managed to figure out how to access Twitter from VBA since
basic auth was shut down?

On Aug 31, 3:31 am, Timo elliott.t...@gmail.com wrote:
 Hi,

 I have an application that posts tweets automatically from PowerPoint
 each time a presenter gets to a particular slide:

 It's a relatively simpleVBAscript that uses basic authentication
 (until tomorrow, when it gets turned off!) . Because it's a full-
 client application, I requested, and obtained, the ability to use
 xAuth.

 But I've struggled to find an easy way to use xAuth / Oauth fromVBA.
 I'm not even sure it's possible at all using onlyVBA-- specifically,
 I haven't found any nativeVBA HMAC-SHA1 code, and lack the skills
 to write one (I found this post on SHA1 inVBA, but don't know how to
 include the key / HMAC part -- anybody 
 know?:http://splinter.com.au/blog/?p=86).

 As a workaround, I tried adding a DLL to do the HMAC-SHA1 part, based
 on this 
 post:http://blog.gobansaor.com/2008/02/22/xlaws-excel-vba-code-for-accessi...,
 and haven't completely given up, but my attempts so far don't seem to
 generate the right signature (i.e. when I cut and paste the available
 xAuth demo code from twitter, I get a different result than they do).
 I also started checking out the HMAC-SHA1 library 
 fromhttp://www.cryptosys.net/#api,
 but my application is freeware, so trying to avoid commercial code...

 And I know there are .Net VB libraries  like 
 TwitterVBhttp://twittervb.codeplex.com/,
 but I don't know how to access those methods/properties fromVBA-- is
 it possible? Could somebody point me to demo code that shows how to
 use something like that fromVBA?

 Many, many thanks in advance to anybody who can help my application
 from dying tomorrow!...

-- 
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?hl=en


Re: [twitter-dev] Re: Automated OAuth

2010-09-02 Thread Taylor Singletary
We provide a convenience feature on dev.twitter.com/apps that allows you to
retrieve the access token and access token secret for your own account (that
the application belongs to). This allows you to very easily implement a
single-user application. You can see some examples of working with some
libraries from the point of having an access token here:
http://bit.ly/1token

Taylor

On Thu, Sep 2, 2010 at 1:57 AM, Stuie Wakefield
stubertb...@googlemail.comwrote:

 I also have this issue with one of my applications. We are using an
 automated twitter account to post updates as a Twitter feed. The OAuth
 authentication process requires a user to be redirected to Twitter to
 enter the username and password to authorize a request token in order
 to provide controlled access to an application while keeping the
 user's credentials secure. For these type of accounts we know the
 username and password and so the OAuth process is superfluous in these
 circumstances. The only way I can think of to do this, after Basic
 Authentication is removed, feels a bit dirty but is as follows:

 1) Call the request_token API method using the consumer keys
 2) HTTP GET the authorize API method using the request tokens
 3) Regex the resulting response to extract form variables and tokens
 4) HTTP POST the action parameter of the form (make sure follow
 redirects is on) including the extracted form variables, the username
 and the password
 5) Extract returned parameters from the response
 6) Follow the remainder of the OAuth process

 Is there a better method for doing this?

 --
 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?hl=en


-- 
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?hl=en


[twitter-dev] Re: Using oAuth by Curl

2010-09-02 Thread Decklin Foster
On Sep 1, 10:36 pm, Andrea Stagi stagi.and...@gmail.com wrote:
 There are any alternatives??

You can try Curlicue:

http://github.com/decklin/curlicue

There is no installation step at the moment, just run the script (see
the instructions for how to get and save your tokens). Feedback
appreciated!

-- 
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?hl=en


Re: [twitter-dev] How to obtain latest tweet

2010-09-02 Thread Stefan Kendrew
Excellent, got this working in under 10 min. If I could buy you a beer I would.

Stef

On Thu, Sep 2, 2010 at 4:40 PM, M. Edward (Ed) Borasky
zn...@borasky-research.net wrote:
 I don't know the PHP, but the call does *not* require authentication if you
 are willing to live with 150 API calls per hour. It's GET users/show

 http://dev.twitter.com/doc/get/users/show

 The last tweet (if there is one) will be an embedded status object. At the
 same cost of 150 unauthenticated API calls per hour, you can pick up the
 most recent 200 tweets with GET statuses/user_timeline

 http://dev.twitter.com/doc/get/statuses/user_timeline

 The default is 20 tweets, but you can get as many as 200 per call by using
 the count parameter.

 --
 M. Edward (Ed) Borasky
 http://borasky-research.net http://twitter.com/znmeb

 A mathematician is a device for turning coffee into theorems. - Paul Erdos


 Quoting stef stefankend...@gmail.com:

 I've been asked to display the latest tweet of one certain twitter
 account on that person's website. I understand one has to use OAuth. I
 have added an application in the twitter account and have obtained all
 the various tokens.

 The documentation seems to talk a lot about authenticating users but
 AFAIK this is not required if I simply want to display one tweet,
 which is public anyway. Even the rss feed can not longer be accessed
 with OAuth ?

 What is the easiest way to just display the latest tweet on a site,
 using php?

 --
 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?hl=en








-- 
stefankend...@gmail.com
phone: +32 479 825 931

-- 
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?hl=en


Re: [twitter-dev] Re: Using oAuth by Curl

2010-09-02 Thread Taylor Singletary
This looks like a great tool, Decklin!

Taylor

On Thu, Sep 2, 2010 at 8:25 AM, Decklin Foster deck...@red-bean.com wrote:

 On Sep 1, 10:36 pm, Andrea Stagi stagi.and...@gmail.com wrote:
  There are any alternatives??

 You can try Curlicue:

 http://github.com/decklin/curlicue

 There is no installation step at the moment, just run the script (see
 the instructions for how to get and save your tokens). Feedback
 appreciated!

 --
 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?hl=en


-- 
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?hl=en


[twitter-dev] Re: oauth echo php sample

2010-09-02 Thread Marsh Gardiner
Not sure how much this would help you, but you can see any header that
has been sent via Apigee's test console via the request tab.

http://app.apigee.com/console/twitter

If there's more information you'd like to see in there, do let us
know, as we're always working to improve the test console.

Marsh

On Sep 1, 8:02 pm, sdenike den...@gmail.com wrote:
 Does anyone have a sample header that should be sent back to twitter
 as well as maybe the curl commands?  I have been trying to construct a
 header to send back to twitter using OAuth echo, but have not been
 successful in doing so.  And example would be excellent if anyone is
 able to provide.  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?hl=en


[twitter-dev] Re: win phone 7 xAuth

2010-09-02 Thread Justin Hart
Like Taylor said, find your time offset relative to Twitter's.  The
WP7 Emulator timestamp is terribly off, and it is probably a good idea
to keep your own offset anyway with devices that may have been off-
network a long time (or in the future, zune devices which dont have a
source).

In my personal library (based on the real basic OAuthBase.cs) I'm
grabbing the timestamp and calculating an offset from the system
clock, so I only have to grab the time every so often.

I didn't see if the timestamp Hammock uses is injectable though.

On Sep 1, 1:21 am, Hongwei suhongwe...@gmail.com wrote:
 Hi guys,

 Does anyone know what is wrong with my code? it always returns Failed
 to validate oauth signature and token (it did return access token and
 access access secret few day ago)

 here is my code (I use Hammock/TweetSharp library)

 private const string _consumerKey = cKey;
 private const string _consumerSecret = cSecret;
 private string _userName = uName;
 private string _password = uPassword;

 Button.Click
 {
  Hammock.RestClient c = new RestClient()
                                        {
                                            Authority = https://
 api.twitter.com/oauth/,
                                            HasElevatedPermissions =
 true,
                                            Credentials = new
 OAuthCredentials()
                                            {
                                                Type =
 OAuthType.ClientAuthentication,
                                                ConsumerKey =
 _consumerKey,
                                                ConsumerSecret =
 _consumerSecret,
                                                SignatureMethod =
 OAuthSignatureMethod.HmacSha1,
                                                ParameterHandling =
 OAuthParameterHandling.HttpAuthorizationHeader,
                                                ClientUsername =
 _userName,
                                                ClientPassword =
 _password,
                                            }
                                        };

             RestRequest r = new RestRequest()
                                 {
                                     Path = access_token,
                                 };
             c.BeginRequest(r, new RestCallback(Callback));

 }

  public void Callback(Hammock.RestRequest request,
 Hammock.RestResponse response, object userState)
         {
             var a = response.Content;           (I set debug here, and
 variable 'a' contains Failed to validate oauth signature and token,
 RestRespone.content contains 'Content' threw an exception of
 typeSystem.UnauthorizedAccessException
         }

 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?hl=en


Re: [twitter-dev] Re: oauth echo php sample

2010-09-02 Thread Taylor Singletary
Hey there,

I'm not sure if I completely understand where you might be going wrong.

With these requests you are trying to OAuth Echo -- are you executing them
against Twitter before you try to execute them through the Echo step? If so,
the act of executing a request against Twitter will invalidate the
re-attempted request by Echoing client.

 Have you validated whether the credentials being passed to your through the
Echo'd request are actually correct? (a) is the access token valid and
active, (b) is the consumer key valid and active, (c) is the user suspended?

Taylor

On Thu, Sep 2, 2010 at 8:37 AM, Marsh Gardiner ma...@apigee.com wrote:

 Not sure how much this would help you, but you can see any header that
 has been sent via Apigee's test console via the request tab.

 http://app.apigee.com/console/twitter

 If there's more information you'd like to see in there, do let us
 know, as we're always working to improve the test console.

 Marsh

 On Sep 1, 8:02 pm, sdenike den...@gmail.com wrote:
  Does anyone have a sample header that should be sent back to twitter
  as well as maybe the curl commands?  I have been trying to construct a
  header to send back to twitter using OAuth echo, but have not been
  successful in doing so.  And example would be excellent if anyone is
  able to provide.  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?hl=en


-- 
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?hl=en


[twitter-dev] Re: t.co Rollout

2010-09-02 Thread Rich
Yeah my point is that clients when posting shouldn't have to be aware
of this wrapping. As far as posting is concerned, what the client says
is 140 characters is 140 characters.  If Twitter decides to change the
number of characters after posting, then that's their issue, it
shouldn't be the client's issue.

I really only need to give one reason for this, user's are stupid.  If
you have your character counter at 50 chars left and then all of a
sudden it changes but your character display shows something else,
they won't understand and will simply complain the app is broken.

 I believe all t.co links are 20 characters.

 -jonathan

-- 
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?hl=en


[twitter-dev] Re: t.co Rollout

2010-09-02 Thread Rich
Are there any plans to include include_entities to the search api as
we can't parse these unless it is included, and also means clients
can't show proper links when using the search api

-- 
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?hl=en


[twitter-dev] Re: Using oAuth by Curl

2010-09-02 Thread Andrea Stagi
Yeah it's true...Thank you all, I'll try and give you a feedback!!

Regards

On Sep 2, 5:29 pm, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 This looks like a great tool, Decklin!

 Taylor



 On Thu, Sep 2, 2010 at 8:25 AM, Decklin Foster deck...@red-bean.com wrote:
  On Sep 1, 10:36 pm, Andrea Stagi stagi.and...@gmail.com wrote:
   There are any alternatives??

  You can try Curlicue:

 http://github.com/decklin/curlicue

  There is no installation step at the moment, just run the script (see
  the instructions for how to get and save your tokens). Feedback
  appreciated!

  --
  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?hl=en

-- 
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?hl=en


[twitter-dev] Re: oauth echo php sample

2010-09-02 Thread sdenike
Hey Taylor,

I guess maybe I am unclear on how to properly achieve what I am trying
to do, hence why I am having so many issues.  I know its been done
time and time again, but I am looking to create a service for me and
my friends that will act like a twitpic.  All of us have iPhones so we
are all using the Twitter app.  Since the image upload request is sent
to my server I am gathering that I have to grab the HTTP headers so I
can get the X-Verify-Credentials-Authorization information.  From
there my understanding was that I had to use something like CURL to
send a header containing much of that information back to Twitter so
that I could get the information stored in the
https://api.twitter.com/1/account/verify_credentials.json which would
allow me to store information about the photo in my database eg screen
name of who uploaded it and geo ip if avail etc..  I have read over
the api wiki information and its not clear on how to get from start to
finish on this.  Thats the information I am looking for.  The main
page of my app works fine which physically allows people to login to
twittter via Abrahams twitter libs but since the iPhone twitter app
does not send the token secret etc I cant get the
verify_credentials.json.  Thanks again for any help on this.

On Sep 2, 8:52 am, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Hey there,

 I'm not sure if I completely understand where you might be going wrong.

 With these requests you are trying to OAuth Echo -- are you executing them
 against Twitter before you try to execute them through the Echo step? If so,
 the act of executing a request against Twitter will invalidate the
 re-attempted request by Echoing client.

  Have you validated whether the credentials being passed to your through the
 Echo'd request are actually correct? (a) is the access token valid and
 active, (b) is the consumer key valid and active, (c) is the user suspended?

 Taylor



 On Thu, Sep 2, 2010 at 8:37 AM, Marsh Gardiner ma...@apigee.com wrote:
  Not sure how much this would help you, but you can see any header that
  has been sent via Apigee's test console via the request tab.

 http://app.apigee.com/console/twitter

  If there's more information you'd like to see in there, do let us
  know, as we're always working to improve the test console.

  Marsh

  On Sep 1, 8:02 pm, sdenike den...@gmail.com wrote:
   Does anyone have a sample header that should be sent back to twitter
   as well as maybe the curl commands?  I have been trying to construct a
   header to send back to twitter using OAuth echo, but have not been
   successful in doing so.  And example would be excellent if anyone is
   able to provide.  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?hl=en

-- 
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?hl=en


[twitter-dev] Where Am I going wrong? Can't get past step 1 of Oauth Integration in PHP...

2010-09-02 Thread Ryan
Spent the day trying to get OAuth working with PHP, curse August the
31st, first time I've heard of it, etc,etc. Anyhow I need some help to
see where I'm going wrong with this code to retireve the auth token
 Please...

?php
  function CalcHmacSha1($data,$key) {

$blocksize = 64;
$hashfunc = 'sha1';
if (strlen($key)  $blocksize) {
  $key = pack('H*', $hashfunc($key));
}
$key = str_pad($key, $blocksize, chr(0x00));
$ipad = str_repeat(chr(0x36), $blocksize);
$opad = str_repeat(chr(0x5c), $blocksize);
$hmac = pack(
'H*', $hashfunc(
($key^$opad).pack(
'H*', $hashfunc(
($key^$ipad).$data
)
)
)
);
return $hmac;
  }


define(TWITTER_CONSUMER_KEY, XX);
define(TWITTER_CONSUMER_SECRET,
X);

define(TWITTER_OAUTH_HOST,https://api.twitter.com;);
define(TWITTER_REQUEST_TOKEN_URL, TWITTER_OAUTH_HOST . /oauth/
request_token);
define(TWITTER_AUTHORIZE_URL, TWITTER_OAUTH_HOST . /oauth/
authorize);
define(TWITTER_ACCESS_TOKEN_URL, TWITTER_OAUTH_HOST . /oauth/
access_token);
define(TWITTER_PUBLIC_TIMELINE_API, TWITTER_OAUTH_HOST . /statuses/
public_timeline.json);
define(TWITTER_UPDATE_STATUS_API, TWITTER_OAUTH_HOST . /statuses/
update.json);

$oauth_callback=http://www.refreshcreations.co.uk/twittertest/ryan-
oauth.php;
define(OAUTH_SIGNATURE_METHOD, HMAC-SHA1);
$oauth_timestamp = date(YmdHis);
define(OAUTH_VERSION, 1.0);
$oauth_nonce = md5(microtime());
$timestamp = date(YmdHis);

$post_data = oauth_callback=.$oauth_callback;
$post_data.= oauth_consumer_key=.TWITTER_CONSUMER_KEY;
$post_data.= oauth_nonce=.$oauth_nonce;
$post_data.= oauth_signature_method=.OAUTH_SIGNATURE_METHOD;
$post_data.= auth_timestamp=.$oauth_timestamp;
$post_data.= oauth_version=.OAUTH_VERSION;

$post_data=rawurlencode($post_data);
$post_data.=rawurlencode(oauth_signature=.CalcHmacSha1($post_data,
TWITTER_CONSUMER_SECRET.));


$auth_header =X-Verify-Credentials-Authorization: OAuth realm=
\http://api.twitter.com\,;;
$auth_header.=OAuth oauth_nonce=\.$oauth_nonce.\, ;
$auth_header.=oauth_callback=\.$oauth_callback.\, ;
$auth_header.=oauth_signature_method=\.OAUTH_SIGNATURE_METHOD.\,
;
$auth_header.=oauth_timestamp=\.$oauth_timestamp.\, ;
$auth_header.=oauth_consumer_key=\.TWITTER_CONSUMER_KEY.\, ;
$auth_header.=oauth_signature=\.CalcHmacSha1($post_data,
TWITTER_CONSUMER_SECRET.).\, ;
$auth_header.=oauth_version=\.OAUTH_VERSION.\, ;

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, TWITTER_REQUEST_TOKEN_URL);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array($auth_header));
$curlresponse = curl_exec($curl);
curl_exec($curl);


//GET CURL VALUES BACK.

$info = curl_getinfo($curl);

echo dl;
foreach($info as $key =$value){
echo dt.$key./dtdd.$value./dd;
}
echo /dl\n;


?

returns: Failed to validate oauth signature and token
any ideas?

-- 
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?hl=en


Re: [twitter-dev] Re: 401 errors calling access_token

2010-09-02 Thread Marc Mims
* Taylor Singletary taylorsinglet...@twitter.com [100901 08:35]:
 I'll try to respond to you today. It's no excuse, I know, but we've been
 busy! :)

*nudge*

-- 
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?hl=en


Re: [twitter-dev] Re: New SSL certificate issue with WTK 2.5.2

2010-09-02 Thread Ernandes Jr.
If you use Twitter API ME Single Access token auth you will get access to
Twitter API, even on emulator. When you use this type of auth, HTTPS is
bypassed. But is just a workaround, since Single Access token has its
constraints.

On Wed, Sep 1, 2010 at 11:40 PM, Pradeep Senanayake 
pradeepd.senanay...@gmail.com wrote:

 HI Matt.
 tel me how can I get rid of that exception using HTTP. Thanks in
 advance.

 On Aug 31, 9:06 am, Matt Harris thematthar...@twitter.com wrote:
  Hey Netroboost,
 
  If the device doesn't support wildcard SSL these isn't much that can
  be done except to use HTTP. This isn't recommended but if you have no
  choice it's all you can do.
 
  The only caveats to know about are:
  * xAuth requires SSL so won't be available to any devices that do not
  support our certificate
  * transmitting OAuth secrets without SSL increases their risk of being
  compromised
 
  Hope that helps,
  Matt
 
 
 
  On Fri, Aug 27, 2010 at 3:18 AM, Netroboost netrobo...@gmail.com
 wrote:
 
   Hi Matt,
 
   Thank you for your response. Yes, I was finally able to get rid of the
   exception with the method you suggested.
 
   However as far as I know the issue extends beyond the Sun Java WTK.
   Various handset manufacturers have different implementations of this
   JSR and while some do accept wildcard SSL certificates, some do not.
 
   In such a case wouldn't it be sensible for mobile app developers to
   use the HTTP method as a fail-safe method for authentication? Is there
   any catch to this?
 
   Regards,
 
   Amit.
 
   On Aug 26, 6:22 am, Matt Harris thematthar...@twitter.com wrote:
   Hi Amit,
 
   This is an issue with the Sun WTK 2.5.2 not accepting wildcard SSL
   certificates and not with the Twitter API. In the future we would like
   to move to a single domain certificate but there is no date as to when
   that will be.
 
   Whilst it isn't something we like you to do, the OAuth process isn't
   forbidden over SSL, just strongly discouraged. This means HTTP could
   be used - but again, this is discouraged.
 
   Instead, as wildcard SSL certificates are perfectly valid I recommend
   asking on the developer forums for the Sun WTK to see if support will
   be added to the toolkit itself.
 
   Best,
   Matt
 
   On Mon, Aug 23, 2010 at 12:35 AM, Netroboost netrobo...@gmail.com
 wrote:
Hi,
 
Has this issue been resolved yet?
 
I am using Sun WTK 2.5.2 and facing the same issue. The error
 message
reads:
 
Subject alternative name did not match site name
 
Please help if anyone knows how to deal with this.
 
Thanks,
 
Amit.
 
On Jul 23, 10:18 pm, Matt Harris thematthar...@twitter.com wrote:
Hi,
 
I've seen similar reports for other service providers about this
 issue as
well. My concern is wildcard certificates are perfectly valid and
 are
described in RFC2818 [1]. I'm not sure why Sun WTK doesn't support
 them or
of any workarounds but I would suggest asking on their support
 channels.
 
If there are any changes on our systems we will be communicate them
 through
this developer mailing list.
 
Best,
Matt
 
1.http://www.ietf.org/rfc/rfc2818.txt
 
On Fri, Jul 23, 2010 at 4:56 AM, bjcoredev jme...@gmail.com
 wrote:
 How  will we be warned when  api.twitter.com fixed SSL
 certificate
 will be effective ?
 
 On 22 juil, 21:17, John Adams j...@twitter.com wrote:
  Unfortunately, the current situation is that api.twitter.comis on 
  a
  wildcard certificate.
 
  We have plans to move it a fixed SSL certificate in the near
 future, but
 no
  definite date yet.
 
  -j
 
  On Thu, Jul 22, 2010 at 11:50 AM, bjcoredev jme...@gmail.com
 wrote:
 
   My app doesn't use the mobile site.
 
   My twitter client is written in J2ME (Java Micro Edition) and
 is not
   using the mobile site but the Twitter API.
 
   I m coding  my client with WTK 2.5.2 Sun Wireless Toolkit
 (like many
   other Java mobile developers) and since  the 21/07/2001 1AM
 GMT
   my app  running under WTK can't access the url
  https://api.twitter.com/oauth/access_token
   because the WTK CAN'T HANDLE WILDCARD SSL certificates.
   returning the error:Subject alternative name did not match
 site
   name.
 
   I'have read that real (real devices opposite to the emulator)
 mobile
   JAVA platforms (Sony ericsson,WM 5.0,..)  don't accept
 wildcard SSL
   certificates so twitter clients using twitter API  written in
 J2ME
   running under these platform can't access the url
  https://api.twitter.com/oauth/access_token
   anymore so can't process xAuth authentication wich will be
 mandatory
   on 15 august
   So .
 
   On 22 juil, 20:20, John Adams j...@twitter.com wrote:
The mobile site has used a wildcard certificate for the
 last two
 years;
   Did
you recently begin experiencing this issue or was your code
 working
 

Re: [twitter-dev] Twitter Authentication

2010-09-02 Thread Ernandes Jr.
With SDK 3 it is supposed to work. You will have to import Equifax
certificate.

Check this tutorial:

http://kenai.com/projects/twitterapime/forums/forum/topics/3078-How-To-Using-Twitter-API-ME-with-Java-ME-SDK-3-0

On Thu, Sep 2, 2010 at 1:52 AM, Pradeep Senanayake 
pradeepd.senanay...@gmail.com wrote:

 HI

 I also tried on J2ME platform 3 but its too gives an exception like belows

 javax.microedition.pki.CertificateException: Certificate was issued by an
 unrecognized entity

 pls tel me how to avoid these certificate thing and get it done using Http.

 thanks  regards,
 Pradeep.


 On Thu, Sep 2, 2010 at 10:34 AM, Pradeep Senanayake 
 pradeepd.senanay...@gmail.com wrote:

 HI,

 Thaks for the immediate  reply.

 It doesnt work in nokia N95 also, but I will try it on wtk 3.

 Thanks  Regards,
 Pradeep.


 On Wed, Sep 1, 2010 at 8:09 PM, Ernandes Jr. ernan...@gmail.com wrote:

 Hi,

 This is a known issue of WTK 2.5.2, which has some issues to support the
 type of certificate used by Twitter. It has nothing to do with the API
 itself. I suggest you to try it on Java ME Plataform SDK 3 or on your
 device.

 Regards,
 Ernandes


 On Wed, Sep 1, 2010 at 2:20 AM, Pradeep Senanayake 
 pradeepd.senanay...@gmail.com wrote:

 Hi,

 Im using TwitterMe api for my mobile application, I registered my
 application in twitter and got the consumer key and the secret key.
 The problem Im having is after I post a twit it gives an exception
 which tells

 javax.microedition.pki.CertificateException: Subject alternative name
 did not match site name

 This is how I do the post.

 Credential credential = new Credential(user,
 pwd,Constants.twitConsumerKey,Constants.twitConsumerSecretKey);
 UserAccountManager userAccMgr =
 UserAccountManager.getInstance(credential);
if (userAccMgr.verifyCredential()) {
Tweet tweet = new Tweet(message);
TweetER tweeter =
 TweetER.getInstance(userAccMgr);
tweet = tweeter.post(tweet);
DialogFrame frame =  new DialogFrame();
frame.setTitle(Twitter);
frame.setBody(Successfully Twitted!);
frame.createUI(2);
}


 pls some body help me. Thanks in advance.

 pradeep.

 --
 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?hl=en




 --
 Ernandes Jr.
 -
 ALL programs are poems. However,
 NOT all programmers are poets.

  --
 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?hl=en



  --
 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?hl=en




-- 
Ernandes Jr.
-
ALL programs are poems. However,
NOT all programmers are poets.

-- 
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?hl=en


[twitter-dev] How do I enable my account to start using t.co

2010-09-02 Thread sfz01
I have setup my application to make use of Twitter OAuth and was
hoping to start making use of Twitter' s url shorting mechanism t.co.

Question is do I enable my account to use t.co? or is this a new
setting in the registered application. Will this be via some  API
call.

You response is much appreciated.

-- 
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?hl=en


[twitter-dev] Re: Twitter logout - hate to open this can of worms again

2010-09-02 Thread Matei
bump?

On Sep 1, 10:45 am, Matei mad.doroba...@gmail.com wrote:
 Hi everyone,

 I am compelled to ask because the search turned out a few post that
 were somewhat vague and didn't answer all my questions.

 I have a website widget that interacts heavily with Twitter. We use
 OAuth to authenticate our requests. To logout the users from our side
 we destroy the OAuth token. However during the initial OAuth workflow
 Twitter places a cookie on the browser, so if the user logs out from
 our site but navigates to the Twitter site they are still logged in.
 Closing the browser solves this, as it appears the cookie is a session
 cookie. Calling the account/end_session.json end point does nothing
 for use because the call is server side so the cookie doesn't get
 replaced.

 I am a little concerned about this behavior since the widget will be
 on a public site users can access from public computers. It is
 possible the users will log out of our widget but not close the
 browser window. At that point someone could navigate to twitter and
 still be logged in with their account.

 So finally my questions are:
 1. Is how do I reliably log users out of Twitter?
 2. Is it really necessary for Twitter to send this cookie during the
 OAuth workflow? The API is stateless so the cookie is really un-
 necessary as far as using the apis is concerned.

 Sorry for the lengthy post, responses are greatly appreciated!

 Cheers,
 Matei

-- 
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?hl=en


[twitter-dev] Re: Tweet button fails to parse URL

2010-09-02 Thread John
Thanks Matt. Is there any kind of ETA for when this might be fixed?

On Aug 26, 6:40 pm, Matt Harris thematthar...@twitter.com wrote:
 Thanks for letting us know about this John, i've let the team know so
 they can fix it.

 Best,
 Matt





 On Wed, Aug 25, 2010 at 2:29 AM, John j...@wordie.org wrote:
  Hello,

  When I try and populate a Tweet button link with a data-url attribute
  of the form:
 http://www.wordnik.com/thesaurus/hen#w1=birdw2=fowl

  I get the message:
  'url' parameter does not contain a valid URL.

  I first thought I needed to escape the ampersand, but after trying
  every conceivable way of doing that, I instead replaced the # with
  a ?, and it works fine. So it seems ampersands are only a problem when
  there is no ?.

  This strikes me as a bug -- the url above is valid (it's using the
  onhashchange event tosavestate).

  Is this a known issue, or is there a workaround for it, or am I
  missing something here?

  Best,
  John

  --
  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?hl=en

 --

 Matt Harris
 Developer Advocate, Twitterhttp://twitter.com/themattharris

-- 
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?hl=en


[twitter-dev] OAuth Authentication Authorization interchangeability?

2010-09-02 Thread Jonathan del Strother
Hi,
Our site offers cross-site logins using Twitter's authentication oauth
url, and also has post-to-twitter functionality using the
authorization url.  To what extent are the tokens obtained from either
of these interchangeable?  It seems like I can use an authentication
token to post tweets, for example.  Is this guaranteed to stay like
this, or must I get both authentication  authorization if I want to
log a user in from their twitter account, and also post stuff to their
twitter account?

-Jonathan

-- 
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?hl=en


[twitter-dev] Twitter use OAuth vs VB6

2010-09-02 Thread DAMnet
Hello,

I used the Visual Basic 6 Twitter status update code:
Dim objHTTP As Object
Set objHTTP = CreateObject(Microsoft.XMLHTTP)

objHTTP.open POST, http://twitter.com/statuses/update.xml;,
False, strUsername, strPassword
objHTTP.send status=  strMessage
 SendToTwitter = objHTTP.responseText

Set objHTTP = Nothing 'Release the object


Have can I make it works for OAuth use?
I have already a Consumer key and Consumer secret

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?hl=en


[twitter-dev] Access protected account?

2010-09-02 Thread Tolga Koseoglu
Hi:

 

I am building a simple Twitter client for the users of my company. We are
dealing with about 5 different twitter accounts. Most of them are
unprotected and adding an application is pretty straight forward. However,
with protected accounts I am missing the Connections tab under Settings.
I am able to click on Api and the bottom and create an application, but I
will don't get the CusmerKey and ConsumerSecret.

 

Any ideas?

Thanks

--tolga

 

 

-- 
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?hl=en


[twitter-dev] Ars Technica article

2010-09-02 Thread Clay Loveless
Hi guys,

I'm really interested in the platform team's response to the Ars Technica 
article here:

http://arstechnica.com/security/guides/2010/09/twitter-a-case-study-on-how-to-do-oauth-wrong.ars

if wrapped:

http://bit.ly/dhLkx7

What's the word, guys?

-Clay

--
Clay Loveless
Founder
w: http://killersoft.com
t: @claylo



-- 
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?hl=en


Re: [twitter-dev] Where Am I going wrong? Can't get past step 1 of Oauth Integration in PHP...

2010-09-02 Thread Tom van der Woerdt
On 9/2/10 6:46 PM, Ryan wrote:
 Spent the day trying to get OAuth working with PHP, curse August the
 31st, first time I've heard of it, etc,etc. Anyhow I need some help to
 see where I'm going wrong with this code to retireve the auth token
  Please...
 
 ?php
   function CalcHmacSha1($data,$key) {
 
 $blocksize = 64;
 $hashfunc = 'sha1';
 if (strlen($key)  $blocksize) {
   $key = pack('H*', $hashfunc($key));
 }
 $key = str_pad($key, $blocksize, chr(0x00));
 $ipad = str_repeat(chr(0x36), $blocksize);
 $opad = str_repeat(chr(0x5c), $blocksize);
 $hmac = pack(
 'H*', $hashfunc(
 ($key^$opad).pack(
 'H*', $hashfunc(
 ($key^$ipad).$data
 )
 )
 )
 );
 return $hmac;
   }
 
 
 define(TWITTER_CONSUMER_KEY, XX);
 define(TWITTER_CONSUMER_SECRET,
 X);
 
 define(TWITTER_OAUTH_HOST,https://api.twitter.com;);
 define(TWITTER_REQUEST_TOKEN_URL, TWITTER_OAUTH_HOST . /oauth/
 request_token);
 define(TWITTER_AUTHORIZE_URL, TWITTER_OAUTH_HOST . /oauth/
 authorize);
 define(TWITTER_ACCESS_TOKEN_URL, TWITTER_OAUTH_HOST . /oauth/
 access_token);
 define(TWITTER_PUBLIC_TIMELINE_API, TWITTER_OAUTH_HOST . /statuses/
 public_timeline.json);
 define(TWITTER_UPDATE_STATUS_API, TWITTER_OAUTH_HOST . /statuses/
 update.json);
 
 $oauth_callback=http://www.refreshcreations.co.uk/twittertest/ryan-
 oauth.php;
 define(OAUTH_SIGNATURE_METHOD, HMAC-SHA1);
 $oauth_timestamp = date(YmdHis);
 define(OAUTH_VERSION, 1.0);
 $oauth_nonce = md5(microtime());
 $timestamp = date(YmdHis);
 
 $post_data = oauth_callback=.$oauth_callback;
 $post_data.= oauth_consumer_key=.TWITTER_CONSUMER_KEY;
 $post_data.= oauth_nonce=.$oauth_nonce;
 $post_data.= oauth_signature_method=.OAUTH_SIGNATURE_METHOD;
 $post_data.= auth_timestamp=.$oauth_timestamp;
 $post_data.= oauth_version=.OAUTH_VERSION;
 
 $post_data=rawurlencode($post_data);
 $post_data.=rawurlencode(oauth_signature=.CalcHmacSha1($post_data,
 TWITTER_CONSUMER_SECRET.));
 
 
 $auth_header =X-Verify-Credentials-Authorization: OAuth realm=
 \http://api.twitter.com\,;;
 $auth_header.=OAuth oauth_nonce=\.$oauth_nonce.\, ;
 $auth_header.=oauth_callback=\.$oauth_callback.\, ;
 $auth_header.=oauth_signature_method=\.OAUTH_SIGNATURE_METHOD.\,
 ;
 $auth_header.=oauth_timestamp=\.$oauth_timestamp.\, ;
 $auth_header.=oauth_consumer_key=\.TWITTER_CONSUMER_KEY.\, ;
 $auth_header.=oauth_signature=\.CalcHmacSha1($post_data,
 TWITTER_CONSUMER_SECRET.).\, ;
 $auth_header.=oauth_version=\.OAUTH_VERSION.\, ;
 
 $curl = curl_init();
 curl_setopt($curl, CURLOPT_URL, TWITTER_REQUEST_TOKEN_URL);
 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
 curl_setopt($curl, CURLOPT_HTTPHEADER, array($auth_header));
 $curlresponse = curl_exec($curl);
 curl_exec($curl);
 
 
 //GET CURL VALUES BACK.
 
 $info = curl_getinfo($curl);
 
 echo dl;
   foreach($info as $key =$value){
   echo dt.$key./dtdd.$value./dd;
   }
 echo /dl\n;
 
 
 ?
 
 returns: Failed to validate oauth signature and token
 any ideas?
 

Multiple.

1. PHP has the hash_hmac function which can do hmac-sha1 for you.
2. Timestamp should be time(), not some date() combination
3. This doesn't look like the normal OAuth stuff, but like OAuth Echo
4. TWITTER_PUBLIC_TIMELINE_API and TWITTER_UPDATE_STATUS_API point
to non-existent pages (missing the version part).
5. I'd recommend using uniqid() for generating a nonce instead of
md5'ing the microtime. It won't cause trouble, but uniqid() is more unique.
6. rawurlencode() isn't the proper function for URL encoding, but I
can't give you a better one right now.
7. You are generating a post_data variable but you don't post it ;-)

Tom

-- 
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?hl=en


Re: [twitter-dev] OAuth Authentication Authorization interchangeability?

2010-09-02 Thread Tom van der Woerdt
On 9/2/10 8:24 PM, Jonathan del Strother wrote:
 Hi,
 Our site offers cross-site logins using Twitter's authentication oauth
 url, and also has post-to-twitter functionality using the
 authorization url.  To what extent are the tokens obtained from either
 of these interchangeable?  It seems like I can use an authentication
 token to post tweets, for example.  Is this guaranteed to stay like
 this, or must I get both authentication  authorization if I want to
 log a user in from their twitter account, and also post stuff to their
 twitter account?
 
 -Jonathan
 

Hi Jonathan,

Not 100% sure what you mean, but if you are talking about the difference
between /oauth/authenticate and /oauth/authorize, then don't worry,
tokens are tokens :-)

Tom

-- 
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?hl=en


[twitter-dev] Follow E-mails

2010-09-02 Thread Jesse Stay
Right now when I initiate follows, the easiest way to determine if the user
is already following the individual I'm trying to follow is to just send a
follow request, and get an error back if the user is already following the
individual.  However, I'm seeing an issue that might not make this the ideal
way of doing this - it seems for each follow request, even if they're
already following the individual they're still getting a follow e-mail from
Twitter.

Now, there could be a slight chance that the user has actually unfollowed
and the e-mail is legit, but I wanted to see if the Twitter API team was
absolutely sure those follow e-mails can't go out if the user is already
following the individual and a follow request is sent.  Does that make
sense?

I'm banging my head against this one - for what I can tell my users aren't
unfollowing each other, so my next guess is that Twitter is just sending out
an e-mail each time we send that follow request.  I'd rather not have to
make 2 API calls just to tell if the user is already following the
individual or not.  Any thoughts?

Thanks,

Jesse

-- 
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?hl=en


Re: [twitter-dev] Where Am I going wrong? Can't get past step 1 of Oauth Integration in PHP...

2010-09-02 Thread Cameron Kaiser
 Spent the day trying to get OAuth working with PHP, curse August the
 31st, first time I've heard of it, etc,etc. Anyhow I need some help to
 see where I'm going wrong with this code to retireve the auth token
  Please...
 
 ?php
   function CalcHmacSha1($data,$key) {
 
 $blocksize = 64;
 $hashfunc = 'sha1';
 if (strlen($key)  $blocksize) {
   $key = pack('H*', $hashfunc($key));
 }
 $key = str_pad($key, $blocksize, chr(0x00));
 $ipad = str_repeat(chr(0x36), $blocksize);
 $opad = str_repeat(chr(0x5c), $blocksize);
 $hmac = pack(
 'H*', $hashfunc(
 ($key^$opad).pack(
 'H*', $hashfunc(
 ($key^$ipad).$data
 )
 )
 )
 );
 return $hmac;
   }

Tom already pointed out that PHP does this for you, but for purposes of
education, I think your $hmac = pack(... line is wrong. You're prepacking
the result of ($key^$ipad).$data, which is changing the output. Try
something like

 $hmac = pack(
 'H*', $hashfunc(
 ($key^$opad).
 $hashfunc(
 ($key^$ipad).$data
 )
 )
 );

Notice only one pack operation, at top level. This assumes that your
SHA-1 is also emitting correct output; watch out for 64-bit systems.

(from a fellow reinventor of the wheel)

-- 
 personal: http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com
-- Today's forecast is total crap! -- Strong Bad, Homestar Runner Menu #11 --

-- 
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?hl=en


[twitter-dev] Tweet Entities bug and a question

2010-09-02 Thread James Teters
I've been experimenting with tweet entities and they seem to work very
well.

I did run across this tweet that did not display properly (when
compared to a regex version):

http://twitter.com/bcherry/status/22825663746

(From a twitter list)

That returned these entities:

{urls:[{indices:[36,70],expanded_url:null,url:http://
lab.simurai.com/css/buttons}],hashtags:[],user_mentions:
[{indices:[46,54],screen_name:simurai,name:simurai,id:
6896972},{indices:[88,97],screen_name:flyosity,name:Mike
Rundle \ue10d,id:10545}]}

At first I thought I was interpreting the entities improperly (which
is certainly possible) but then I noticed that the indices for the
user_mention of the user simurai are within the indices of the url
(which has that screen name in the url).

Am I missing something or is this a bug?

Also, I noticed that there is an expanded_url value that is always
null. Any idea when will this be populated with the expanded url?

-- 
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?hl=en


Re: [twitter-dev] Where Am I going wrong? Can't get past step 1 of Oauth Integration in PHP...

2010-09-02 Thread Martin Dapas
On Thu, Sep 02, 2010 at 10:37:03PM +0200, Tom van der Woerdt wrote:
 On 9/2/10 6:46 PM, Ryan wrote:
  any ideas?
  
 
 Multiple.
 
 1. PHP has the hash_hmac function which can do hmac-sha1 for you.

hash_hamc is not always available. You could check with:

if (extension_loaded ('hash')) {
  hash_hmac ('sha1', $str, $key, true);
} else {
  //use hand_crafted_version
}


 2. Timestamp should be time(), not some date() combination
 3. This doesn't look like the normal OAuth stuff, but like OAuth Echo
 4. TWITTER_PUBLIC_TIMELINE_API and TWITTER_UPDATE_STATUS_API point
 to non-existent pages (missing the version part).
 5. I'd recommend using uniqid() for generating a nonce instead of
 md5'ing the microtime. It won't cause trouble, but uniqid() is more unique.
 6. rawurlencode() isn't the proper function for URL encoding, but I
 can't give you a better one right now.

I believe it is if you are on PHP 5.3 or later. Before that, this
should do it:

function oauth_encode ($str) {
  return str_replace ('%E7', '~', rawurlencode ($str));
}


-- 
Martin Dapas

-- 
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?hl=en


[twitter-dev] Single Token: Using oauth with Perl: 401 Unauthorized

2010-09-02 Thread Lars
Hi,

I am not a Perl expert but I have developed a small web page with Perl
which is somewhat popular in Germany (according to Alexa trafic rank 
1000). And this web site is tweeting important events using its own
twitter account.

I tried for days but I am not able to get it working (tweeting) again.

I registered my web page/application and want to use my access tokens
oauth_token and oauth_token_secret which I find under my
application settings because I am using only this twitter account to
tweet (see http://dev.twitter.com/pages/oauth_single_token)

But the response is always 401 Unauthorized!

Any ideas?

My Perl program looks like this (my provider does not offer the module
NET::Twitter)

#!/usr/bin/perl

use CGI::Carp qw(fatalsToBrowser);
use strict;
use Digest::HMAC_SHA1;
use Encode qw(encode);
use URI::Escape;
use LWP::UserAgent;
use HTTP::Request::Common ('POST');

my $api_url = http://api.twitter.com/1/statuses/update.json;;
my $status = Hello world;
my $oauth_consumer_key = XYZ;
my $oauth_consumer_secret = XYZ;
my $oauth_nonce = 101;
my $oauth_signature_method = HMAC-SHA1;
my $oauth_token = XYZ; # from my application under my access token
my $oauth_token_secret = XYZ; # from my application under my access
token
my $oauth_timestamp = 1272325550;
my $oauth_version = 1.0;
my $content = oauth_consumer_key=$oauth_consumer_keyoauth_nonce=
$oauth_nonceoauth_signature_method=
$oauth_signature_methodoauth_timestamp=$oauth_timestampoauth_token=
$oauth_tokenoauth_version=$oauth_versionstatus=$status;

my $signature_base_str = POST . uri_escape_RFC3986($api_url) .
 . uri_escape_RFC3986($content);

my $HMAC_SHA1_key = uri_escape_RFC3986(Encode::encode(UTF-8,
$oauth_consumer_secret));
   $HMAC_SHA1_key .= ;
   $HMAC_SHA1_key .= uri_escape_RFC3986(Encode::encode(UTF-8,
$oauth_token_secret));

my $hmac = Digest::HMAC_SHA1-new($HMAC_SHA1_key);
   $hmac-add($signature_base_str);
my $signature = $hmac-b64digest;
$signature .= =;

my $ua = LWP::UserAgent-new;
my $req = POST($api_url = [
   oauth_nonce = $oauth_nonce,
   oauth_signature_method = $oauth_signature_method,
   oauth_timestamp = $oauth_timestamp,
   oauth_consumer_key = $oauth_consumer_key,
   oauth_token = $oauth_token,
   oauth_signature = $signature,
   oauth_version = $oauth_version,
   status = $status
   ]);

my $res = $ua-request($req);

print Content-type: text\/html\n\n;

if ($res-is_success) {
 print success: $res-decoded_content;
 }
 else {
 print error:, $res-status_line;
 }

#

sub uri_escape_RFC3986 {
my($str) = @_;

return uri_escape($str,^A-Za-z0-9\-_.~);
}

-- 
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?hl=en


[twitter-dev] @user_mentions and profile_image_urls

2010-09-02 Thread Claudia
I've asked about this before - so apologies if anyone is re-reading
this... I'm needing to get the profile_image_urls of all the
@user_mentions in a timeline. Right now, it looks like the only way I
can do this without killing rate limit in about an hour (which I just
did) is to send a comma separated-list to users/lookup. However - this
is adding major complications to my app structure, and I'd much rather
avoid it. I can store the returned urls in a local DB, but if enough
people use the app within an hour, it'll still quickly exceed the rate
limit.

Does anyone have any suggestions as to how I can get this done? Even
better - anyone at Twitter think that the API could return the
profile_image_url with the current @user_mention data.. seems it would
be useful for many.

Thanks in advance,
Claudia

-- 
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?hl=en


Re: [twitter-dev] Single Token: Using oauth with Perl: 401 Unauthorized

2010-09-02 Thread Taylor Singletary
Hi Lars,

First thing I spotted here was that your timestamp doesn't appear to be
correct.

In fact, it's a timestamp for Mon Apr 26 16:45:50 -0700 2010 -- you'll
need to make sure that your timestamp is in epoch GMT time in seconds.

On a quick glance, the code looks pretty good for this limited use case,
though I didn't go too deeply into it. I would probably also go the extra
mile and make sure your space characters in a POST body value are always
encoded as %20. + will work but is more prone to encoding errors.

Taylor

On Thu, Sep 2, 2010 at 2:33 PM, Lars lars_sa...@hotmail.com wrote:

 Hi,

 I am not a Perl expert but I have developed a small web page with Perl
 which is somewhat popular in Germany (according to Alexa trafic rank 
 1000). And this web site is tweeting important events using its own
 twitter account.

 I tried for days but I am not able to get it working (tweeting) again.

 I registered my web page/application and want to use my access tokens
 oauth_token and oauth_token_secret which I find under my
 application settings because I am using only this twitter account to
 tweet (see http://dev.twitter.com/pages/oauth_single_token)

 But the response is always 401 Unauthorized!

 Any ideas?

 My Perl program looks like this (my provider does not offer the module
 NET::Twitter)

 #!/usr/bin/perl

 use CGI::Carp qw(fatalsToBrowser);
 use strict;
 use Digest::HMAC_SHA1;
 use Encode qw(encode);
 use URI::Escape;
 use LWP::UserAgent;
 use HTTP::Request::Common ('POST');

 my $api_url = http://api.twitter.com/1/statuses/update.json;;
 my $status = Hello world;
 my $oauth_consumer_key = XYZ;
 my $oauth_consumer_secret = XYZ;
 my $oauth_nonce = 101;
 my $oauth_signature_method = HMAC-SHA1;
 my $oauth_token = XYZ; # from my application under my access token
 my $oauth_token_secret = XYZ; # from my application under my access
 token
 my $oauth_timestamp = 1272325550;
 my $oauth_version = 1.0;
 my $content = oauth_consumer_key=$oauth_consumer_keyoauth_nonce=
 $oauth_nonceoauth_signature_method=
 $oauth_signature_methodoauth_timestamp=$oauth_timestampoauth_token=
 $oauth_tokenoauth_version=$oauth_versionstatus=$status;

 my $signature_base_str = POST . uri_escape_RFC3986($api_url) .
  . uri_escape_RFC3986($content);

 my $HMAC_SHA1_key = uri_escape_RFC3986(Encode::encode(UTF-8,
 $oauth_consumer_secret));
   $HMAC_SHA1_key .= ;
   $HMAC_SHA1_key .= uri_escape_RFC3986(Encode::encode(UTF-8,
 $oauth_token_secret));

 my $hmac = Digest::HMAC_SHA1-new($HMAC_SHA1_key);
   $hmac-add($signature_base_str);
 my $signature = $hmac-b64digest;
 $signature .= =;

 my $ua = LWP::UserAgent-new;
 my $req = POST($api_url = [
   oauth_nonce = $oauth_nonce,
   oauth_signature_method = $oauth_signature_method,
   oauth_timestamp = $oauth_timestamp,
   oauth_consumer_key = $oauth_consumer_key,
   oauth_token = $oauth_token,
   oauth_signature = $signature,
   oauth_version = $oauth_version,
   status = $status
   ]);

 my $res = $ua-request($req);

 print Content-type: text\/html\n\n;

 if ($res-is_success) {
  print success: $res-decoded_content;
  }
  else {
  print error:, $res-status_line;
  }

 #

 sub uri_escape_RFC3986 {
my($str) = @_;

return uri_escape($str,^A-Za-z0-9\-_.~);
 }

 --
 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?hl=en


-- 
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?hl=en


Re: [twitter-dev] Single Token: Using oauth with Perl: 401 Unauthorized

2010-09-02 Thread Tom van der Woerdt
There's only one thing I notice and that is that you seem to be adding a
= to your signature. Why?

I also noticed that you don't URL encode the values in $content. If I
recall correctly, you have to URL encode those as well.

If that was not the issue, then please show your Base String and the
HTTP request.

Tom



On 9/2/10 11:33 PM, Lars wrote:
 Hi,
 
 I am not a Perl expert but I have developed a small web page with Perl
 which is somewhat popular in Germany (according to Alexa trafic rank 
 1000). And this web site is tweeting important events using its own
 twitter account.
 
 I tried for days but I am not able to get it working (tweeting) again.
 
 I registered my web page/application and want to use my access tokens
 oauth_token and oauth_token_secret which I find under my
 application settings because I am using only this twitter account to
 tweet (see http://dev.twitter.com/pages/oauth_single_token)
 
 But the response is always 401 Unauthorized!
 
 Any ideas?
 
 My Perl program looks like this (my provider does not offer the module
 NET::Twitter)
 
 #!/usr/bin/perl
 
 use CGI::Carp qw(fatalsToBrowser);
 use strict;
 use Digest::HMAC_SHA1;
 use Encode qw(encode);
 use URI::Escape;
 use LWP::UserAgent;
 use HTTP::Request::Common ('POST');
 
 my $api_url = http://api.twitter.com/1/statuses/update.json;;
 my $status = Hello world;
 my $oauth_consumer_key = XYZ;
 my $oauth_consumer_secret = XYZ;
 my $oauth_nonce = 101;
 my $oauth_signature_method = HMAC-SHA1;
 my $oauth_token = XYZ; # from my application under my access token
 my $oauth_token_secret = XYZ; # from my application under my access
 token
 my $oauth_timestamp = 1272325550;
 my $oauth_version = 1.0;
 my $content = oauth_consumer_key=$oauth_consumer_keyoauth_nonce=
 $oauth_nonceoauth_signature_method=
 $oauth_signature_methodoauth_timestamp=$oauth_timestampoauth_token=
 $oauth_tokenoauth_version=$oauth_versionstatus=$status;
 
 my $signature_base_str = POST . uri_escape_RFC3986($api_url) .
  . uri_escape_RFC3986($content);
 
 my $HMAC_SHA1_key = uri_escape_RFC3986(Encode::encode(UTF-8,
 $oauth_consumer_secret));
$HMAC_SHA1_key .= ;
$HMAC_SHA1_key .= uri_escape_RFC3986(Encode::encode(UTF-8,
 $oauth_token_secret));
 
 my $hmac = Digest::HMAC_SHA1-new($HMAC_SHA1_key);
$hmac-add($signature_base_str);
 my $signature = $hmac-b64digest;
 $signature .= =;
 
 my $ua = LWP::UserAgent-new;
 my $req = POST($api_url = [
oauth_nonce = $oauth_nonce,
oauth_signature_method = $oauth_signature_method,
oauth_timestamp = $oauth_timestamp,
oauth_consumer_key = $oauth_consumer_key,
oauth_token = $oauth_token,
oauth_signature = $signature,
oauth_version = $oauth_version,
status = $status
]);
 
 my $res = $ua-request($req);
 
 print Content-type: text\/html\n\n;
 
 if ($res-is_success) {
  print success: $res-decoded_content;
  }
  else {
  print error:, $res-status_line;
  }
 
 #
 
 sub uri_escape_RFC3986 {
 my($str) = @_;
 
 return uri_escape($str,^A-Za-z0-9\-_.~);
 }
 

-- 
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?hl=en


Re: [twitter-dev] Single Token: Using oauth with Perl: 401 Unauthorized

2010-09-02 Thread Marc Mims
* Lars lars_sa...@hotmail.com [100902 14:38]:
 I am not a Perl expert but I have developed a small web page with Perl
 which is somewhat popular in Germany (according to Alexa trafic rank 
 1000). And this web site is tweeting important events using its own
 twitter account.
 
 I tried for days but I am not able to get it working (tweeting) again.
 
 I registered my web page/application and want to use my access tokens
 oauth_token and oauth_token_secret which I find under my
 application settings because I am using only this twitter account to
 tweet (see http://dev.twitter.com/pages/oauth_single_token)
 
 But the response is always 401 Unauthorized!
 
 Any ideas?
 
 My Perl program looks like this (my provider does not offer the module
 NET::Twitter)

If you have shell access, you can probably install local::lib using the
bootstrap method, then install Net::Twitter or Net::Twitter::Lite in
your own directory.

-Marc

-- 
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?hl=en


[twitter-dev] Re: Where Am I going wrong? Can't get past step 1 of Oauth Integration in PHP...

2010-09-02 Thread Ryan
FIrstly, Thank you so much for all the pointers everyone. I'm looking
forward to fixing this up tomorrow loads!

Every day I try to learn something new, Thank you all once again.

-- 
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?hl=en


[twitter-dev] Re: Single Token: Using oauth with Perl: 401 Unauthorized

2010-09-02 Thread Lars
Why aren't my answers to Tom being displayed?

I based my program on the exmaples I found under 
http://apiwiki.twitter.com/OAuth-Examples
especially on the example of Scott Carter 
http://www.social.com/main/twitter-oauth-using-perl/.
I followed his comment:

# Add padding character to make a multiple of 4 per the
# requirement of OAuth.
$signature .= =;

 I also noticed that you don't URL encode the values in $content. If I
 recall correctly, you have to URL encode those as well.

I think I do encode them with

my $signature_base_str = POST . uri_escape_RFC3986($api_url) .
 . uri_escape_RFC3986($content);

correct?

 If that was not the issue, then please show your Base String and the
 HTTP request.

This is the base string:

POSThttp%3A%2F2Fapi.twitter.com%2F1%2Fstatuses
%2Fupdate.jsonoauth_consumer_key%3DXXX%26oauth_nonce
%3D101%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
%3D1272325550%26oauth_token%3DXXX%26oauth_version%3D1.0%26status
%3DHello%20world

What do you mean with show us the HTTP request. I think I am doing the
HTTP request with

my $ua = LWP::UserAgent-new;
my $req = POST($api_url = [
   oauth_nonce = $oauth_nonce,
   oauth_signature_method = $oauth_signature_method,
   oauth_timestamp = $oauth_timestamp,
   oauth_consumer_key = $oauth_consumer_key,
   oauth_token = $oauth_token,
   oauth_signature = $signature,
   oauth_version = $oauth_version,
   status = $status
   ]);

# Make the request
my $res = $ua-request($req);

On 3 Sep., 00:23, Lars lars_sa...@hotmail.com wrote:
 Sorry, I don't habe shell access...

 On 3 Sep., 00:20, Marc Mims marc.m...@gmail.com wrote:



   I am not a Perl expert but I have developed a small web page with Perl
   which is somewhat popular in Germany (according to Alexa trafic rank 
   1000). And this web site is tweeting important events using its own
   twitter account.

   I tried for days but I am not able to get it working (tweeting) again.

   I registered my web page/application and want to use my access tokens
   oauth_token and oauth_token_secret which I find under my
   application settings because I am using only this twitter account to
   tweet (seehttp://dev.twitter.com/pages/oauth_single_token)

   But the response is always 401 Unauthorized!

   Any ideas?

   My Perl program looks like this (my provider does not offer the module
   NET::Twitter)

  If you have shell access, you can probably install local::lib using the
  bootstrap method, then install Net::Twitter or Net::Twitter::Lite in
  your own directory.

          -Marc

-- 
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?hl=en


[twitter-dev] Re: Twitter Button Counts

2010-09-02 Thread abilek
Hi Matt

Pursuant to my last post, I checked what the tweet button was sending
and what it was getting back from the count api

script type=text/javascript src=http://urls.api.twitter.com/1/urls/
count.json?url=http://www.nzherald.co.nz/sport/news/article.cfm?
c_id=4amp;objectid=10670662amp;callback=twttr.receiveCount/
script

is what is being requested in the tweet button iframe, and the count
API returns

twttr.receiveCount({count:0,url:http://www.nzherald.co.nz/sport/
news/article.cfm/?c_id=4})

Which would explain why all our counts on all our articles are 0 - we
need to count our full canonical URL, the one set in data-counturl.

Cheers
anne

On Aug 26, 12:56 pm, themattharris thematthar...@twitter.com wrote:
 Hi Jonathan,

 The counting of URLs like yours will count correctly for Tweets from
 now on.
 Thanks for letting us know about the problems you were having so we
 could track the bug down and fix it.

 Best,
 Matt

 On Aug 24, 6:30 pm, Jonathan Strauss jonat...@snowballfactory.com
 wrote:

  Ah, canonicalization. Thanks Matt.

  As you probably know, those URL parameters (other than awesm=) are
  standard Google Analytics tracking parameters. So, it's something that
  should probably be handled better by the counter code. But at least we
  now know the root cause.

  Thanks,
  -jonathan

  On Aug 24, 5:23 pm, Matt Harris thematthar...@twitter.com wrote:

   Hi Jonathan,

   The count we use is completely separate to search so no inference
   should be drawn from there. As well as that the search index is only 5
   or so days now so anything Tweeted before then won't be found.
   When counting URLs we count the final destination of a shortURL so it
   doesn't matter which is used.

   Knowing this I took a look at the code you shared and it looks good,
   but here's the problem I noticed. The URL being Tweeted is not the URL
   you placed in data-counturl. You can see this when you hover over the
   short URL in the backtype results.

   Instead of:
    http://blog.snowballfactory.com/2010/08/15/tweet-button-with-shorteni...

   You are Tweeting:
    http://blog.snowballfactory.com/2010/08/15/tweet-button-with-shorteni...

   When I replaced your data-counturl with the Tweeted URL I was shown a
   count of 6. In this case 6 makes sense as this is the number of t.co
   links created from that longer query string URL. The 3 other URLs are
   not counted recognised because they have different utm_content and
   awesm values.

   I've passed this information onto theTweetButtonteam who are
   working on ways to identify that the URLs like this below are
   collapsed into the correct URL:

  http://blog.snowballfactory.com/2010/08/15/tweet-button-with-shorteni..

   I hope this explains why your situation occurs,
   Best,
   Matt

   On Tue, Aug 24, 2010 at 10:46 AM, Jonathan Strauss

   jonat...@snowballfactory.com wrote:
Matt, I've been using data-counturl from the start and still seeing 0
   counts.

Here is the source for thebuttonon
   http://blog.snowballfactory.com/2010/08/15/tweet-button-with-shorteni...
which is showing 0 tweets:

a href=http://twitter.com/share; class=twitter-share-button data-
url=http://awe.sm/59O75; data-counturl=http://
blog.snowballfactory.com/2010/08/15/tweet-button-with-shortening-for-
wordpress/ data-text=TweetButtonwith Shortening for WordPress
data-count=vertical data-via=snowballfactory data-
related=jhstrauss:Author of the postTweet/ascript type=text/
javascript src=http://platform.twitter.com/widgets.js;/script

As you can see, BackType is indexing the tweets correctly:
   http://www.backtype.com/page/blog.snowballfactory.com%2F2010%2F08%2F1...

Yet Twitter search doesn't appear to be:
   http://search.twitter.com/search?q=http%3A%2F%2Fblog.snowballfactory

From what I can see, the issue appears to be related to what short
URLs Twitter is choosing to index for the count.

Thanks,
-jonathan

On Aug 24, 12:10 am, Matt Harris thematthar...@twitter.com wrote:
Hey everyone,

This is a repeat of a message on another thread.

I've updated theTweetButtondocs today with information which I hope
will answer a number of your questions. In particular the example
about using a short URL with the parameter data-counturl should help
those of you whosecountsare staying at 0.
 http://dev.twitter.com/pages/tweet_button#using-shorturl

For reference the documentation URLs are:
 http://dev.twitter.com/pages/tweet_button
and
 http://dev.twitter.com/pages/tweet_button_faq

Hope that helps,
Matt

On Mon, Aug 23, 2010 at 2:10 AM, artesea ryancul...@gmail.com wrote:
 Just tried something else, I click on atweetcontaining one of my
 short urls
 this actually redirects to
http://www.libdemvoice.org/?p=20818utm_source=tweetutm_medium=twitt...
 by setting
 data-counturl=http://www.libdemvoice.org/?p=20818;
 it finallycountsall the 

[twitter-dev] Re: Count not working for url's with 2+ parameters

2010-09-02 Thread abilek
If I understand Lukas correctly, he doesn't want to send two URLs. He
wants the count to work properly on URLs with more than two
parameters.

The count API seems to be stripping out all but the first URL param.
So if you have a page

http://www.example.com/page.html?param1=fooparam2=bar

the count API counts http://www.example.com/page.html?param1=foo - not
the proper URL. Even if you set the canonical URL in the data-counturl
attribute.

Cheers,
anne

On Aug 31, 11:11 am, Matt Harris thematthar...@twitter.com wrote:
 Hey Lukas,

 TheTweetButtoncurrently allows you to share one URL at a time.
 Can you give an example of what you require two URLs on onebuttonfor?

 Best,
 Matt



 On Sun, Aug 29, 2010 at 3:11 PM, Lukas lukas.winzenr...@gmail.com wrote:
  Hi

  Thetweetbuttondoes not count if the data-url has more than 1 url
  parameters
 http://www.jobscout24.ch/JS24Web/JobView/JobDetail.aspx?lng=dewl=1j...
  (this is the canonical url)

  The request to the count api takes only the last one of the parameters
  into accout, all the others are lost ;-(

  Is there a workarouond for this issue (none of the encodings i tried
  seems to work, even with use of data-counturl) or does anyone know if
  theres a fix planned for this?

  Thanks
  Lukas

  --
  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?hl=en

 --

 Matt Harris
 Developer Advocate, Twitterhttp://twitter.com/themattharris

-- 
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?hl=en


[twitter-dev] Re: Twitter Button Counts

2010-09-02 Thread abilek
Hi Matt

We are having the same problem with counts not updating on our site.
We've tested with several people tweeting the same link (using the
tweet button), and still the count shows 0.

The page in question is 
http://www.nzherald.co.nz/sport/news/article.cfm?c_id=4objectid=10670662

a href=http://twitter.com/share; class=twitter-share-button
data-count=horizontal data-via=nzherald
data-related=HeraldOnlineEnt:nzheraldtv
data-url=http://www.nzherald.co.nz/sport/news/article.cfm?
c_id=4objectid=10670662ref=twitter
data-counturl=http://www.nzherald.co.nz/sport/news/article.cfm?
c_id=4objectid=10670662
data-text=Top ten cricket scoundrels - Sport - NZ Herald NewsTweet/
a

From everything I've read in the forums and the tweet button FAQ this
should provide us with correct counts. We are still seeing 0 tweets
for every article in our highly trafficked (and retweeted) site.

Can you look into this please? Otherwise I know we will be asked to
remove the tweet button next week as it is not a good look.

Cheers,
anne

On Aug 26, 12:56 pm, themattharris thematthar...@twitter.com wrote:
 Hi Jonathan,

 The counting of URLs like yours will count correctly for Tweets from
 now on.
 Thanks for letting us know about the problems you were having so we
 could track the bug down and fix it.

 Best,
 Matt

 On Aug 24, 6:30 pm, Jonathan Strauss jonat...@snowballfactory.com
 wrote:

  Ah, canonicalization. Thanks Matt.

  As you probably know, those URL parameters (other than awesm=) are
  standard Google Analytics tracking parameters. So, it's something that
  should probably be handled better by the counter code. But at least we
  now know the root cause.

  Thanks,
  -jonathan

  On Aug 24, 5:23 pm, Matt Harris thematthar...@twitter.com wrote:

   Hi Jonathan,

   The count we use is completely separate to search so no inference
   should be drawn from there. As well as that the search index is only 5
   or so days now so anything Tweeted before then won't be found.
   When counting URLs we count the final destination of a shortURL so it
   doesn't matter which is used.

   Knowing this I took a look at the code you shared and it looks good,
   but here's the problem I noticed. The URL being Tweeted is not the URL
   you placed in data-counturl. You can see this when you hover over the
   short URL in the backtype results.

   Instead of:
    http://blog.snowballfactory.com/2010/08/15/tweet-button-with-shorteni...

   You are Tweeting:
    http://blog.snowballfactory.com/2010/08/15/tweet-button-with-shorteni...

   When I replaced your data-counturl with the Tweeted URL I was shown a
   count of 6. In this case 6 makes sense as this is the number of t.co
   links created from that longer query string URL. The 3 other URLs are
   not counted recognised because they have different utm_content and
   awesm values.

   I've passed this information onto theTweetButtonteam who are
   working on ways to identify that the URLs like this below are
   collapsed into the correct URL:

  http://blog.snowballfactory.com/2010/08/15/tweet-button-with-shorteni..

   I hope this explains why your situation occurs,
   Best,
   Matt

   On Tue, Aug 24, 2010 at 10:46 AM, Jonathan Strauss

   jonat...@snowballfactory.com wrote:
Matt, I've been using data-counturl from the start and still seeing 0
counts.

Here is the source for thebuttonon
   http://blog.snowballfactory.com/2010/08/15/tweet-button-with-shorteni...
which is showing 0 tweets:

a href=http://twitter.com/share; class=twitter-share-button data-
url=http://awe.sm/59O75; data-counturl=http://
blog.snowballfactory.com/2010/08/15/tweet-button-with-shortening-for-
wordpress/ data-text=TweetButtonwith Shortening for WordPress
data-count=vertical data-via=snowballfactory data-
related=jhstrauss:Author of the postTweet/ascript type=text/
javascript src=http://platform.twitter.com/widgets.js;/script

As you can see, BackType is indexing the tweets correctly:
   http://www.backtype.com/page/blog.snowballfactory.com%2F2010%2F08%2F1...

Yet Twitter search doesn't appear to be:
   http://search.twitter.com/search?q=http%3A%2F%2Fblog.snowballfactory

From what I can see, the issue appears to be related to what short
URLs Twitter is choosing to index for the count.

Thanks,
-jonathan

On Aug 24, 12:10 am, Matt Harris thematthar...@twitter.com wrote:
Hey everyone,

This is a repeat of a message on another thread.

I've updated theTweetButtondocs today with information which I hope
will answer a number of your questions. In particular the example
about using a short URL with the parameter data-counturl should help
those of you whose counts are staying at 0.
 http://dev.twitter.com/pages/tweet_button#using-shorturl

For reference the documentation URLs are:
 http://dev.twitter.com/pages/tweet_button
and
 http://dev.twitter.com/pages/tweet_button_faq

Hope that helps,
   

[twitter-dev] Official clients and public availability of the APIs they use

2010-09-02 Thread lqd
Hi guys,

I was wondering where to find the doc and endpoints URIs of some APIs
the official twitter clients use. I've tried the wiki, the bug tracker
on google code, this list and developer.twitter.com but I can't seem
to find info on the signup api, neither on the 'users similar to X'
feature you can see on someone's profile on the iPad client, or the
who to follow data twitter.com uses (which would probably be the
same API as 'similar users') other than Taylor's 2 mails from last
month saying this API would come very soon.

Is there something I missed or are there any updates, or ETA, on the
availability of those APIs to clients other than the official ones ?

Thanks very much in advance
Remy

-- 
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?hl=en


[twitter-dev] Re: Automated OAuth

2010-09-02 Thread Cradash
Unfortunately that is not an option for us as we have no 'users'. We
have a server that gleans information then posts it into twitter
feeds, all automated.

On Sep 2, 11:30 pm, Tom van der Woerdt i...@tvdw.eu wrote:
 Don't worry, you'll get your answer, and if not then you'll just have to
 wait until my school is over (which is now).

 Anyway, to answer your question: Yes, you may like to use xAuth to
 convert all username/password combinations to OAuth credentials. For new
 users you should simply do the OAuth Dance. You can then use these
 credentials to make the requests to the API.

 Tom

 On 9/2/10 12:00 PM, Cradash wrote:

  xAuth perhaps?

  On Sep 2, 4:28 pm, Cradash rand...@gmail.com wrote:
  A Java example is unnecessary, more to the point I basically just need
  to figure out how it can be done.

  On Sep 2, 3:40 pm, Cradash rand...@gmail.com wrote:

  We are a bit late to the game and haven't migrated to Oauth and now
  are scrambling to do so, we're running some Automated tweets (we get
  the info and put it in a Twitter stream). I haven't found any examples
  of how to authorize an automated stream and was wondering in anyone
  had any suggestions . It's written in Scala but all I would need is a
  Java example.

-- 
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?hl=en


Re: [twitter-dev] Automated OAuth

2010-09-02 Thread Taylor Singletary
Each Twitter feed in this case is a user.

On Thursday, September 2, 2010, Cradash rand...@gmail.com wrote:
 Unfortunately that is not an option for us as we have no 'users'. We
 have a server that gleans information then posts it into twitter
 feeds, all automated.

-- 
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?hl=en


[twitter-dev] Re: Automated OAuth

2010-09-02 Thread Cradash
Yes, but I have not found a way  to have the server go out with the
consumer Key/secret then get the id # programmaticly, that's what I
was looking for.

On Sep 3, 9:44 am, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Each Twitter feed in this case is a user.

 On Thursday, September 2, 2010, Cradash rand...@gmail.com wrote:
  Unfortunately that is not an option for us as we have no 'users'. We
  have a server that gleans information then posts it into twitter
  feeds, all automated.

-- 
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?hl=en


[twitter-dev] Simple status update

2010-09-02 Thread Tomáš Pospíšil
Hi,
I'm trying to update my twitter status every time, when new post
appears on my website. I found several classes (in PHP), but none of
them works, because they don't implement OAuth.
Classes which implement OAuth let anybody update their status through
my page. But that is not the functionality I need. Maybe I'm blind,
but there wasn't any field or variable, where i could set my username,
password and new status message and let the class do the rest of the
work...
Please, if you know about some class, that can do what I need, or at
least some tutorial let me know, it would be very helpful.

Thank you!

-- 
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?hl=en


Re: [twitter-dev] OAuth Authentication Authorization interchangeability?

2010-09-02 Thread Matt Harris
The tokens you get back from authenticate and authorize are permanent
and do not expire. They will continue to work unless the user revokes
your application, you regenerate your applications consumer
key/secret, or your application is deleted or suspended.

The tokens you get back will be the same from /authenticate and
/authorize so long as none of the conditions above occur.

Hope that helps,
Matt

On Thu, Sep 2, 2010 at 1:39 PM, Tom van der Woerdt i...@tvdw.eu wrote:
 On 9/2/10 8:24 PM, Jonathan del Strother wrote:
 Hi,
 Our site offers cross-site logins using Twitter's authentication oauth
 url, and also has post-to-twitter functionality using the
 authorization url.  To what extent are the tokens obtained from either
 of these interchangeable?  It seems like I can use an authentication
 token to post tweets, for example.  Is this guaranteed to stay like
 this, or must I get both authentication  authorization if I want to
 log a user in from their twitter account, and also post stuff to their
 twitter account?

 -Jonathan


 Hi Jonathan,

 Not 100% sure what you mean, but if you are talking about the difference
 between /oauth/authenticate and /oauth/authorize, then don't worry,
 tokens are tokens :-)

 Tom

 --
 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?hl=en




-- 


Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris

-- 
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?hl=en


Re: [twitter-dev] Follow E-mails

2010-09-02 Thread Matt Harris
I haven't heard that this is happening, and when I make a follow
request multiple times I don't receive duplicate emails - even if I
cancel and resend.

One thing that may help is that you can see the status of a friendship
by calling /users/show on the user you want to check the follow
request for. If the user you are authenticating using OAuth as has
made a request the data key: follow_request_sent will be true.

Hope that helps,
Matt


On Thu, Sep 2, 2010 at 1:42 PM, Jesse Stay jesses...@gmail.com wrote:
 Right now when I initiate follows, the easiest way to determine if the user
 is already following the individual I'm trying to follow is to just send a
 follow request, and get an error back if the user is already following the
 individual.  However, I'm seeing an issue that might not make this the ideal
 way of doing this - it seems for each follow request, even if they're
 already following the individual they're still getting a follow e-mail from
 Twitter.
 Now, there could be a slight chance that the user has actually unfollowed
 and the e-mail is legit, but I wanted to see if the Twitter API team was
 absolutely sure those follow e-mails can't go out if the user is already
 following the individual and a follow request is sent.  Does that make
 sense?
 I'm banging my head against this one - for what I can tell my users aren't
 unfollowing each other, so my next guess is that Twitter is just sending out
 an e-mail each time we send that follow request.  I'd rather not have to
 make 2 API calls just to tell if the user is already following the
 individual or not.  Any thoughts?
 Thanks,
 Jesse

 --
 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?hl=en




-- 


Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris

-- 
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?hl=en


Re: [twitter-dev] Re: Where Am I going wrong? Can't get past step 1 of Oauth Integration in PHP...

2010-09-02 Thread Matt Harris
There are also a couple of libraries on
http://dev.twitter.com/pages/oauth_libraries#php that you might find
useful for reference.

Best,
Matt

On Thu, Sep 2, 2010 at 3:23 PM, Ryan refreshcreation...@googlemail.com wrote:
 FIrstly, Thank you so much for all the pointers everyone. I'm looking
 forward to fixing this up tomorrow loads!

 Every day I try to learn something new, Thank you all once again.

 --
 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?hl=en




-- 


Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris

-- 
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?hl=en


Re: [twitter-dev] How to get results older than last 100 tweets from a profile or search

2010-09-02 Thread Pablo Augusto
Thanks Matt,

I have just put all to work with new oauth autentication method.

Now i saw that search return different user_id from other apis... i just
search about and see that only way to
workarround is a reverse screen_name lookup. I'll do it.

Now I'm improving a php class to get more efficiency.

Thanks in advanced for yout time.


best regards,
*
*
 *Pablo Augusto*
 MSN: m...@pabloaugusto.com
SKYPE: sk...@pabloaugusto.com
EMAIL: cont...@pabloaugusto.com
SITE: http://webtags.com.br

 [image: Linkedin] http://linkedin.com/in/pabloaugusto [image:
Twitter]http://twitter.com/pabloaugusto
 [image: Facebook][image: Flickr]
http://flickr.com/photos/pabloaugusto [image:
Youtube] http://youtube.com/pabloaugustoo [image:
FormSpring]http://formspring.me/pabloaugust0 [image:
LastFM] http://lastfm.com.br/user/pabloaugustoo [image:
DeviantART]http://deviantart.com/pabloaugustoo [image:
Tumblr] http://pabloaugusto.tumblr.com/ [image:
Vimeo]http://vimeo.com/pabloaugusto [image:
del.icio.us] http://del.icio.us/pabloaugusto [image:
Slideshare]http://slideshare.net/pabloaugusto [image:
Friendfeed] http://friendfeed.com/pabloaugusto



On Wed, Sep 1, 2010 at 12:25, Matt Harris thematthar...@twitter.com wrote:

 Hey Pablo,

 The Search index is only 5 days so it makes sense you can only get results
 for that period. Your query is correct and will provide access to the
 information Search knows about.

  The Streaming API will allow you to receive results from the time you
 connect to the API onwards. Information about the Streaming API can be found
 on our developer resources site:
 http://dev.twitter.com/pages/streaming_api

 We have a list of community written libraries which might be of interest:
 http://dev.twitter.com/pages/oauth_libraries

 Best,
 Matt


 On Tue, Aug 31, 2010 at 8:01 AM, Pablo Augusto em...@pabloaugusto.comwrote:

 Thanks for the reply.

 I just tested and its ok, but only can ger results to 2010-08-28 from now.
 Hav any way to workarround this?

 //return null is lower than 28º day
 $request = 
 http://search.twitter.com/search.atom?q=from:user+keyword+since:2010-08-27rpp=100page=
 .$j;

 One question.
 Any one knows a updated class for the twiter api? Or can show me any
 example of a current working code to search api or streaming api?
 I had read that streaming api is best to monitoring keywords and track
 users. Anyone here has write a blog post about streaming api with php? Or
 search api with php?


 It's just working, but i want se some examples of best practices in this
 area.


 Thanks in advanced.


 [image: Pablo Augusto]
 *Design e Desenvolvimento*
 MSN: m...@pabloaugusto.com
 SKYPE: sk...@pabloaugusto.com
 EMAIL: cont...@pabloaugusto.com
 TWITTER: @pabloaugusto
 SITE: http://pabloaugusto.com
  On Tue, Aug 31, 2010 at 03:21, Matt Harris thematthar...@twitter.comwrote:

 Hey Pablo,

 The reason you are getting 100 results is because you are passing a
 results per page (rpp) value of 100. To access the next 100 results you need
 to request the next page, which you can do by setting the parameter 'page'
 equal to the page you want.

 You can find out more about search on our developer resources site:
 http://dev.twitter.com/doc/get/search

 Hope that helps,
 Matt

 On Mon, Aug 30, 2010 at 6:34 PM, Pablo Augusto 
 em...@pabloaugusto.comwrote:


 Hello,

 I'm wondering if its possible to get back the twits from one account for
 last 3 days for example.
 im useing a class that do the follow search to capture tweets:

 $request  = 
 'http://search.twitter.com/search.'.$this-http://search.twitter.com/search.%27.$this-
 type;
  $request .= '?q='.urlencode($this-query);

 Using the methos of this class i do the fololow search:

 $search = new TwitterSearch();
 $search-from('@username');
 $search-contains('#hashtag');
 $search-since(22554873450);
 $results = $search-rpp(100)-results();

 But i only get the last 100 results (the newest ever)
 I just try to put a low number at SINCE:

 for example: $search-since(21554873450);

 Buts aver show the last newest results.


 Anyone knows how can i get results older than last 100 newest in any
 querry, class, function, etc?

 if anyone can help, ill be graceful.



 *
 *
 *Pablo Augusto*
  MSN: m...@pabloaugusto.com
 SKYPE: sk...@pabloaugusto.com
 EMAIL: cont...@pabloaugusto.com
 SITE: http://webtags.com.br

  [image: Linkedin] http://linkedin.com/in/pabloaugusto [image:
 Twitter] http://twitter.com/pabloaugusto [image: Facebook][image:
 Flickr] http://flickr.com/photos/pabloaugusto [image: 
 Youtube]http://youtube.com/pabloaugustoo [image:
 FormSpring] http://formspring.me/pabloaugust0  [image: 
 LastFM]http://lastfm.com.br/user/pabloaugustoo [image:
 DeviantART] http://deviantart.com/pabloaugustoo [image: 
 Tumblr]http://pabloaugusto.tumblr.com/ [image:
 Vimeo] http://vimeo.com/pabloaugusto [image: 
 del.icio.us]http://del.icio.us/pabloaugusto [image:
 Slideshare] http://slideshare.net/pabloaugusto [image: 
 

Re: [twitter-dev] Twitter oAuth

2010-09-02 Thread Edward J. Yoon
Thanks!

On Thu, Sep 2, 2010 at 10:56 PM, Cameron Kaiser spec...@floodgap.com wrote:
 BTW, basic auth seems still available on some applications (e.g.,
 http://twtkr.com/index.php ). I just wondered whether there is a way
 to verify id/password via OAuth.

 Those apps are probably using xAuth.

 --
  personal: http://www.cameronkaiser.com/ 
 --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com
 -- Diamonds are forever. 
 --

 --
 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?hl=en




-- 
Best Regards, Edward J. Yoon
edwardy...@apache.org
http://blog.udanax.org

-- 
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?hl=en


Re: [twitter-dev] Re: Twitter logout - hate to open this can of worms again

2010-09-02 Thread Abraham Williams
There is no pragmatic way to sign a user out of twitter.com through the API.

When a user logs out of your site send them to to twitter.com so they can
sign out there or to a page explaining they should sign out of twitter.com

Abraham
-
Abraham Williams | Hacker Advocate | http://abrah.am
@abraham | http://projects.abrah.am | http://blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.


On Thu, Sep 2, 2010 at 10:43, Matei mad.doroba...@gmail.com wrote:

 bump?

 On Sep 1, 10:45 am, Matei mad.doroba...@gmail.com wrote:
  Hi everyone,
 
  I am compelled to ask because the search turned out a few post that
  were somewhat vague and didn't answer all my questions.
 
  I have a website widget that interacts heavily with Twitter. We use
  OAuth to authenticate our requests. To logout the users from our side
  we destroy the OAuth token. However during the initial OAuth workflow
  Twitter places a cookie on the browser, so if the user logs out from
  our site but navigates to the Twitter site they are still logged in.
  Closing the browser solves this, as it appears the cookie is a session
  cookie. Calling the account/end_session.json end point does nothing
  for use because the call is server side so the cookie doesn't get
  replaced.
 
  I am a little concerned about this behavior since the widget will be
  on a public site users can access from public computers. It is
  possible the users will log out of our widget but not close the
  browser window. At that point someone could navigate to twitter and
  still be logged in with their account.
 
  So finally my questions are:
  1. Is how do I reliably log users out of Twitter?
  2. Is it really necessary for Twitter to send this cookie during the
  OAuth workflow? The API is stateless so the cookie is really un-
  necessary as far as using the apis is concerned.
 
  Sorry for the lengthy post, responses are greatly appreciated!
 
  Cheers,
  Matei

 --
 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?hl=en


-- 
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?hl=en