[twitter-dev] Re: Twitter JSON feed falls out with php

2011-06-15 Thread Patrick Kennedy

You are accessing API in an unauthentic way and without oAuth, and you
are running out of API calls.  You can add a service method to track
remaining  API calls that you have left to confirm this, e.g,
http://api.twitter.com/1/account/rate_limit_status.{xml | json}.  You
can research from thousands of PHP tutorials and examples out their
and improve your code base to use oAuth.

Check out http://dev.twitter.com/pages/oauth_single_token to start
into oAuth for your single user feed application.

~Patrick

On Jun 13, 9:47 am, Andreas Voss anv...@gmail.com wrote:
 Hey Twitter Developers.

 I've had a bit om a problem with my home made twitter feed plugin
 for my website, sometimes it just wont load the feed for like 30
 minutes and then it starts working again. Is there any of you familiar
 with this kind of error?
 ?php
 $user = andreasvoss;
 $url = http://twitter.com/statuses/user_timeline/.$user..json;;
 $json = file_get_contents($url);
 $data = json_decode($json);

 foreach($data as $val){
         $screen_name = $val-user-screen_name;
         $tweet = $val-text;
         $date = strtotime($val-created_at);
 ?
               span class=name@?php echo $screen_name; ?/
 spanbr
               span class=update?php echo $tweet; ?/spanbr
               span class=timefor ?php echo $date; ?/
 spanbrbr
 ?php}

 ?

 Kind regards Andreas Voss

-- 
Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
https://groups.google.com/forum/#!forum/twitter-development-talk


[twitter-dev] Re: TweetDeck technical problem

2011-05-29 Thread Patrick Kennedy

I'm using 32-bit platform in this case; AIR seems to install fine.  I
will try @desktopdeck and see what they think.  I have installed
Tweetdeck/AIR on 64-bit Fedora before and used similar info as you
provided to make it work.  However, as noted, I'm only using a 32-bit
platform.

Thanks.

On May 29, 3:24 am, Thomas Woolway priv...@tswoolway.co.uk wrote:
 Hi Patrick,

 You may find the answer 
 here:http://support.tweetdeck.com/entries/181425-how-do-i-install-air-twee
 If not, I suggest asking @desktopdeck to see if they can help.

 Best,

 Tom

 On Sun, May 29, 2011 at 2:37 AM, Patrick Kennedy kenned...@gmail.comwrote:







  This is not strictly a dev question, but I was hoping others here may
  be able to suggest or redirect.  I have recently started using Bodhi
  Linux, but I have not been able to get TweetDeck to work on it.  Bodhi
  is based on the Ubuntu distro, but it's a minimalist version, and the
  user must use apt-get to pull down other software and components.
  TweetDeck works great on Ubuntu, but I have yet to make it work on
  Bodhi.  I can install AIR and TweetDeck, but when launching TweetDeck
  the first time, it says:

  Oops, TweetDeck can't find your data

  TweetDeck is having trouble using some of your passwords that are
  stored securely on your machine.  Clicking Submit will clear this data
  so that you continue to use TweetDeck.

  Please note that you will have to add your accounts to TweetDeck
  again.

  OK

  There is no submit button, per se, but clicking the OK button
  leads to second dialog box that says:

  Sorry, Adobe AIR has a problem running on this computer

  TweetDeck is having trouble storing your passwords securely.  Please
  check the article athttp://kb2.adobe.com/cps/492/cpsid_49267.htmlfor
  information on what may be wrong and how to fix it.

  OK

  Clicking OK will only redisplay this second message repeatedly.
  Clicking the close control button will close the dialog, but it is
  impossible to subsequently add a user account.  I plan to try to
  contact Adobe, but perhaps someone here may know the issue or can
  provide a solid reference for help.

  The question is what component needs to be installed to store
  passwords on Linux with Gnome?  Kwallet is not the ticket (KDE).  The
  gnome keyring service is running, but there appears to be a subsystem
  missing for the password storage for Gnome Desktop apps.

  Any ideas?

  --
  Twitter developer documentation and resources:https://dev.twitter.com/doc
  API updates via Twitter:https://twitter.com/twitterapi
  Issues/Enhancements Tracker:
 https://code.google.com/p/twitter-api/issues/list
  Change your membership to this group:
 https://groups.google.com/forum/#!forum/twitter-development-talk

-- 
Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
https://groups.google.com/forum/#!forum/twitter-development-talk


[twitter-dev] TweetDeck technical problem

2011-05-28 Thread Patrick Kennedy
This is not strictly a dev question, but I was hoping others here may
be able to suggest or redirect.  I have recently started using Bodhi
Linux, but I have not been able to get TweetDeck to work on it.  Bodhi
is based on the Ubuntu distro, but it's a minimalist version, and the
user must use apt-get to pull down other software and components.
TweetDeck works great on Ubuntu, but I have yet to make it work on
Bodhi.  I can install AIR and TweetDeck, but when launching TweetDeck
the first time, it says:

Oops, TweetDeck can't find your data

TweetDeck is having trouble using some of your passwords that are
stored securely on your machine.  Clicking Submit will clear this data
so that you continue to use TweetDeck.

Please note that you will have to add your accounts to TweetDeck
again.

OK

There is no submit button, per se, but clicking the OK button
leads to second dialog box that says:

Sorry, Adobe AIR has a problem running on this computer

TweetDeck is having trouble storing your passwords securely.  Please
check the article at http://kb2.adobe.com/cps/492/cpsid_49267.html for
information on what may be wrong and how to fix it.

OK

Clicking OK will only redisplay this second message repeatedly.
Clicking the close control button will close the dialog, but it is
impossible to subsequently add a user account.  I plan to try to
contact Adobe, but perhaps someone here may know the issue or can
provide a solid reference for help.

The question is what component needs to be installed to store
passwords on Linux with Gnome?  Kwallet is not the ticket (KDE).  The
gnome keyring service is running, but there appears to be a subsystem
missing for the password storage for Gnome Desktop apps.

Any ideas?

-- 
Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
https://groups.google.com/forum/#!forum/twitter-development-talk


[twitter-dev] Re: oAuth with twitpic or yfrog photo uploads in mobile apps

2011-05-28 Thread Patrick Kennedy

Frank -

A lot of the existing examples you see on the Internet use basic
oAuth, but these are just old examples, and you must use oAuth.  It's
possible to make it work -  I've made a basic TwitPic prototype, so I
know it's doable.  (Still working on 4sq tho!)  You simple need to
master the oAuth process, plus you have to deal with the IMAGE upload
and submittal process.  Here's the PHP tutorial that helped me master
TwitPic image uploads -

http://shkspr.mobi/blog/index.php/2010/05/howto-twitpic-and-oauth

And, here's some file uploading background info as a good reference -

http://www.w3schools.com/PHP/php_file_upload.asp

~Patrick

On May 28, 6:55 pm, Frank Ash nut...@gmail.com wrote:
 I am having some trouble integrating either yfrog or twitpic into my
 app. All the others I see are asking for users names and passwords
 inside the app, and not using oauth. Is it possible to let people post
 pictures to their stream using one of these services if the
 application uses only oAuth and not xauth? I am just assuming the
 people asking for account and passwords are using xauth.

 I am trying to integrate it using their new API which uses oauth
 access tokens.

 I get this error consistently:
  Timed out verifying authentication token with Twitter.com. This
 could be a problem with TwitPic servers. Try again later.

-- 
Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
https://groups.google.com/forum/#!forum/twitter-development-talk


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

2011-04-22 Thread Patrick Kennedy
KiTe,

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

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

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

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

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

~Patrick

On Apr 22, 3:02 am, kite 68...@supinfo.com wrote:
 Hello,

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

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

 Cordially,

 KiTe

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Re: Twitter OAuth PHP - Submit tweets without user login?

2011-02-17 Thread Patrick Kennedy
I'd also like to add that if you want to start *reading* tweets, which
is probably inevitable, you should configure your local test server as
local.dev vice localhost (mapping 127.0.0.1 to local.dev in addition
to localhost).

On Feb 17, 2:17 pm, Adamantus dan.cottre...@gmail.com wrote:
 Genius, thanks Abraham that worked great, and so simple.

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Re: localhost testing of Oauth

2011-02-03 Thread Patrick Kennedy

Yes, you can do this with epiTwitter (php) or twitter (ruby) gem, etc,
etc, to do that.  Once you develop the code via localhost, you then
set it up on the Internet with your code to authorize with twitter,
exchanging request tokens for access tokens, if you want different
users to use your program, saving their tokens to session variables or
a database for further calls.

You need to initialize your given library's oauth object with consumer
key, consumer secret, and access token and access secret.

Recently, for example, I was trying to figure out how to do a
localhost setup with ruby twitter_oauth, but I couldn't figure it
out.  But I did get it working with the twitter ruby gem instead.  I
guess I will just use that gem instead of twitter_oauth gem.

~Patrick


On Feb 3, 3:57 am, Ashim ashimkap...@gmail.com wrote:
 Dear All,

 I wish to try Oauth on Mediawiki. Now I have media wiki installed on
 my localhost. When I gotohttps://twitter.com/oauth_clients/new

 and register my app at my localhost it says invalid url.

 My question is : Can localhost apps be registered with Twitter on that
 page ? If not how do I test ?

 Many 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


Re: [twitter-dev] Ruby way using twitter_oauth

2011-02-01 Thread Patrick Kennedy
Specifically, here's what I tried, but it doesn't seem to quite fly -

before do
  next if request.path_info =~ /ping$/

  @user = 'kennedypj'# @user = session[:user]

  @client = TwitterOAuth::Client.new(
:consumer_key = @@config['consumer_key'],
:consumer_secret = @@config['consumer_secret'],
:token =  @@config['token'],
:secret = @@config['secret']
  )
end


On Tue, Feb 1, 2011 at 6:12 PM, Patrick kenned...@gmail.com wrote:
 I'm somewhat burnt out on PHP development, and want to get into Ruby.
 The twitter_oauth gem by @moomerman looks great.

 He says:  Now if you keep hold of the access_token (usually in the
 database) for this user you won’t need to re-authorize them next time.
 When you create an instance of the client you can just pass in the
 access token and secret that you have stored.

 Then he specifies this in the code -

 access_token = @user.access_token # assuming @user

 But this is somewhat opaque to me, given the documentation.  How do I
 create @user such that I can initialize Client.new( ) properly?  I
 have the component parts of an access token, of course.

 If I can do this without the authorization steps, then I can develop
 locally without having to deal with the callback, which makes
 development feasible.  Does a rubyist have a simple snippet of how to
 login via twitter_oauth without authorization URL?

 ~Patrick

 --
 Twitter developer documentation and resources: http://dev.twitter.com/doc
 API updates via Twitter: http://twitter.com/twitterapi
 Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
 Change your membership to this group: 
 http://groups.google.com/group/twitter-development-talk


-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Re: Problem setting up new twitter-async browser app

2011-01-31 Thread Patrick Kennedy
Seems like I just figured out the issue.  For some reason, I have a
problem with my Firefox web browser.  It works fine in Epiphany Web
Browser.  I'm not sure what the issue is with Firefox, but I am trying
to determine the problem.  It is not a cache issue, since I have
already dumped the cache several times.

On Mon, Jan 31, 2011 at 1:39 AM, Patrick kenned...@gmail.com wrote:
 I've copied my consumer key and consumer secret to the secret.php, but
 $twitterObj-getAuthenticateUrl() returns a nasty error.  I've been
 suck on this several days, and I think there is some issue with my
 account, as I normally do not have a problem.  Does this look okay?
 Is there a way I can diagnose this error better?

 ?php
 require EpiCurl.php;
 require EpiOAuth.php;
 require EpiTwitter.php;
 require secret.php;


 $twitterObj = new EpiTwitter(CONSUMER_KEY,CONSUMER_SECRET);
 $authenticateUrl = $twitterObj-getAuthenticateUrl();

 ?

 Fatal error: Uncaught exception 'EpiOAuthException' in /home/pk/server/
 gates/EpiOAuth.php:406 Stack trace: #0 /home/pk/server/gates/
 EpiOAuth.php(376): EpiOAuthException::raise(Object(EpiCurlManager),
 false) #1 /home/pk/server/gates/EpiOAuth.php(39): EpiOAuthResponse-
__get('oauth_token') #2 /home/pk/server/gates/index.php(9): EpiOAuth-
getAuthenticateUrl() #3 {main} thrown in /home/pk/server/gates/
 EpiOAuth.php on line 406

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Re: Problem setting up new twitter-async browser app

2011-01-31 Thread Patrick Kennedy
Actually, it's now working on both sides Firefox and Epiphany.  Just
starting to work suddenly.  My just trying it with Epiphany cleared
the issue somehow.  I'm not sure.  But it's finally working.

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Re: Upgrading from Read to Read / Write access for OAuth API Key

2011-01-31 Thread Patrick Kennedy
Apparently there was a bug before (which I now recall), where if the
developer set it to read only, and subsequently changed it to
read-write, it wouldn't really change to read-write.  However, per
earlier conversation in this thread, that issue appears to have
finally been fixed.

So, if you, as the developer, decide to switch an app that is
currently read-only to read-write, it will finally offer the
read-write functionality.  As a developer, you get to choose that
functionality - it won't change without your approval.

~Patrick

On Mon, Jan 31, 2011 at 1:45 PM, Tim Bull tim.b...@binaryplex.com wrote:
 While this makes me happy (from a developers point of view), surely
 this is a bug and therefore not to be relied on?

 As a user, I agree with the logic that if I authorised Read only, the
 application shouldn't be able to turn this into Read/Write without
 some subsequent approval.

 Tim

 On Jan 31, 1:46 pm, Abraham Williams 4bra...@gmail.com wrote:
 Taylor,

 Confirmed. I just upgraded read only tokens and was able
 to successfully send a DM.

 Thank you for finally allowing read only access tokens to be upgraded to
 read and write access tokens. This issue has been plaguing developers for
 almost a year now. Both forcing applications to ask for permission they
 didn't need if there was even a remote possibility they might want write
 permissions in the future and biting devs in the ass if they unknowingly
 built up a customer base of read only tokens.

 I hope we will continue to see fixes coming down the pipe to keep Twitter
 API a viable platform for further development.

 Thank you again,
 Abraham
 -
 Abraham Williams | Hacker Advocate | abrah.am
 @abraham https://twitter.com/abraham | github.com/abraham | blog.abrah.am
 This email is: [ ] shareable [x] ask first [ ] private.

 On Sun, Jan 30, 2011 at 11:19, Taylor Singletary 







 taylorsinglet...@twitter.com wrote:
  You'll have to re-ask your users for permission for write mode and you
  won't have any way via the API to track who is ready to read/write yet --
  you'll want to manage the conversion process yourself and track whether
  you've converted your users yet or not.

  The thinking behind this is that when your users authorized your app, they
  only authorized it for read-access. Wanting write access requires a new
  agreement with the user.

  The oauth/authorize step should now upgrade to read/write from read-only
  tokens when the user is re-challenged.

  Taylor

  On Sun, Jan 30, 2011 at 8:32 AM, Adam Green 140...@gmail.com wrote:

  So if a user authorizes an app for read access, the app can switch to
  read/write at any time without asking the users permission? Is this
  true? Anyone from Twitter have any input on this?

  On Sun, Jan 30, 2011 at 11:04 AM, Patrick Kennedy kenned...@gmail.com
  wrote:
   Tim -

   1.  Changing from read to read/write won't change you API consumer
   keys or tokens.

   2.  Your application's users don't authorized for read or read/write;
   they merely use your application, which you offer as read or
   read/write to the world.  That is to say, if it's read, your
   application can only read its tweets, and if read/write, it can both
   read its own tweet and post to the world.

   I'd say go ahead and switch to read/write, given the fact that you now
   want that functionality.

   ~Patrick

   On Sat, Jan 29, 2011 at 10:24 PM, Tim Bull tim.b...@binaryplex.com
  wrote:
   We must be about the only developers in the universe that requested
   users grant only read access when we first got people to connect
  http://trunk.lyto Twitter (I think of the 40 or so apps authorized on
   my account, Trunk.ly is the only one that asks for Read only).  Never
   ask for more access than you need is my philosophy.

   Doh!

   Of course now, we want to add some Tweet out functions which require
   users grant us Write access.

   A couple of questions for the Twitter people.

   1. If we change the access in the application from read to read/write
   does this reset the API key, or will it stay the same (hoping it stays
   the same).
   2. How can I work out if existing users have authorised us for read/
   write?  I looked at
 http://developer.twitter.com/doc/get/account/verify_credentials
   but it doesn't show me what access they have.  Do I have to write,
   fail, force them to step through OAuth then post? Or is there a way of
   knowing before hand it will fail and asking them to upgrade?

   Thanks,

   Tim

   --
   Twitter developer documentation and resources:
 http://dev.twitter.com/doc
   API updates via Twitter:http://twitter.com/twitterapi
   Issues/Enhancements Tracker:
 http://code.google.com/p/twitter-api/issues/list
   Change your membership to this group:
 http://groups.google.com/group/twitter-development-talk

   --
   Twitter developer documentation and resources:
 http://dev.twitter.com/doc
   API updates via Twitter:http://twitter.com/twitterapi
   Issues/Enhancements

Re: [twitter-dev] Upgrading from Read to Read / Write access for OAuth API Key

2011-01-30 Thread Patrick Kennedy
Tim -

1.  Changing from read to read/write won't change you API consumer
keys or tokens.

2.  Your application's users don't authorized for read or read/write;
they merely use your application, which you offer as read or
read/write to the world.  That is to say, if it's read, your
application can only read its tweets, and if read/write, it can both
read its own tweet and post to the world.

I'd say go ahead and switch to read/write, given the fact that you now
want that functionality.

~Patrick

On Sat, Jan 29, 2011 at 10:24 PM, Tim Bull tim.b...@binaryplex.com wrote:
 We must be about the only developers in the universe that requested
 users grant only read access when we first got people to connect
 http://trunk.ly to Twitter (I think of the 40 or so apps authorized on
 my account, Trunk.ly is the only one that asks for Read only).  Never
 ask for more access than you need is my philosophy.

 Doh!

 Of course now, we want to add some Tweet out functions which require
 users grant us Write access.

 A couple of questions for the Twitter people.

 1. If we change the access in the application from read to read/write
 does this reset the API key, or will it stay the same (hoping it stays
 the same).
 2. How can I work out if existing users have authorised us for read/
 write?  I looked at 
 http://developer.twitter.com/doc/get/account/verify_credentials
 but it doesn't show me what access they have.  Do I have to write,
 fail, force them to step through OAuth then post? Or is there a way of
 knowing before hand it will fail and asking them to upgrade?

 Thanks,

 Tim

 --
 Twitter developer documentation and resources: http://dev.twitter.com/doc
 API updates via Twitter: http://twitter.com/twitterapi
 Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
 Change your membership to this group: 
 http://groups.google.com/group/twitter-development-talk


-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Re: Net::Twitter::Lite cannot authenticate me

2011-01-28 Thread Patrick Kennedy
Sol,

They do come from Twitter, but your program must retrieve the token
and extract the access token and secret.  If your program doesn't save
them to variables or cookies, subsequent requests will fail, for
example.  You probably haven't probably retrieved them.

That said, I am having problems making new Twitter programs work
during the last 48 hours for newly registered programs.  There may be
some kind of problem with the API.  I wasn't having any problem day
before yesterday.

~Patrick

On Fri, Jan 28, 2011 at 3:02 PM, Sol sol.leder...@gmail.com wrote:
 Marc,

 Where do the access token and access token secret come from?
 I thought they cam from some computation that twitter does with
 the consumer key and consumer_secret. If they don't come from
 there then what do I do to generate/get them?

 Thanks very much.

 Sol

 On Jan 19, 9:20 am, Marc Mims marc.m...@gmail.com wrote:
 * Sol sol.leder...@gmail.com [110115 11:02]:

  Hello. I'm trying to tweet programmatically using the
  Net::Twitter::Lite perl module. I use their example verbatim, with my
  consumer_key and consumer_secret which I got by registering an app on
  twitter.

 Did you also copy/paste your access token and access token secret?
 Those are also required.

         -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


-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Re: Announcing Twurl: OAuth-enabled curl for the Twitter API

2010-05-15 Thread Patrick Kennedy
Faried -

I'm sure it mostly my new newness to Ruby; rake/make files are not my
strong area as well.

If it's fairly small changes, can you provide those changes?
Basically, why patch it - if I can just use a replacement file.  But
since it's not provided yet, maybe you can demonstrate those tweaks?

Well, I'm not asking you to do something, if it's onerous to you - so,
absolutely no worries.  But, then again, if it's trivial, it would be
cool to get working on the new Ubuntu.  Otherwise my passion for
Twitter coding may slowly cool down - though, of course I love all
things Twitter - and I'm trying to get back into the coding of it.

~Patrick

On Sat, May 15, 2010 at 1:55 PM, Faried Nawaz far...@gmail.com wrote:
 I tested both git apply patchfile and patch -p 1 -i patchfile
 separately before posting the commands, and they both worked for me.
 Note that the git command doesn't produce any output, but does patch
 the files.

 If it still isn't working for you, you can always manually edit the
 files.  It's a small change.


 Faried.



Re: [twitter-dev] Re: Announcing Twurl: OAuth-enabled curl for the Twitter API

2010-05-15 Thread Patrick Kennedy
I bet coffee and 10 seconds with either of you would fix my problem,
but no worries.

On Sat, May 15, 2010 at 9:02 PM, kuhkatz kuhk...@googlemail.com wrote:
 Am 14.05.2010 23:40, schrieb Faried Nawaz:

 On May 15, 12:41 am, kuhkatzkuhk...@googlemail.com  wrote:

 so i suppose i am doing things wrong.
 i followed your instructions, but when i apply the diff, i get this:

 $ patch -i twurldiff

 Close.  You can do either one of

 patch -p 1 -i twurldiff

 or

 git apply twurldiff


 Faried.

 tried the first approach,
 gave me an error with lib/twurl.rb,
 but with looking into the .rej and manually patching the file i
 succeded, finally.

 thanks for your help =)



Re: [twitter-dev] Re: Announcing Twurl: OAuth-enabled curl for the Twitter API

2010-05-14 Thread Patrick Kennedy
Hi, Faried -

I tried it too, since I have Linux 10.04, and it also has a problem at
the patching part, even provided your two ways to execute the diff.
I'm also new to Ruby stuff.

 $ patch -i twurldiff

patching file Rakefile
Hunk #1 FAILED at 2.
Hunk #2 FAILED at 69.
2 out of 2 hunks FAILED -- saving rejects to file Rakefile.rej
patching file lib/twurl.rb
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED -- saving rejects to file lib/twurl.rb.rej
patching file test/rcfile_test.rb
Hunk #1 FAILED at 138.
1 out of 1 hunk FAILED -- saving rejects to file test/rcfile_test.rb.rej

Just feedback.  Patrick


On Sat, May 15, 2010 at 4:40 AM, Faried Nawaz far...@gmail.com wrote:
 On May 15, 12:41 am, kuhkatz kuhk...@googlemail.com wrote:

 so i suppose i am doing things wrong.
 i followed your instructions, but when i apply the diff, i get this:

 $ patch -i twurldiff

 Close.  You can do either one of

 patch -p 1 -i twurldiff

 or

 git apply twurldiff


 Faried.



Re: [twitter-dev] Re: Send Cyrillic character (OAuth)

2010-05-10 Thread Patrick Kennedy
Z-13,

Don't forget to do rake db:migrate to build the tables in Sqlite.

Agile Web Development with Rails has the skinny to install rails for
Mac, Linux, or Windows, if you need more solid material.


On Mon, May 10, 2010 at 8:23 PM, Taylor Singletary
taylorsinglet...@twitter.com wrote:
 Hi Z-13,
 It's a Ruby on Rails application, though it doesn't require too much
 familiarity with Ruby on Rails to get up and running with it.
 On a Mac or Linux environment, it should be as easy as git cloning the
 repository ( http://learn.github.com/p/intro.html ) then trying to start the
 server from within the directory that unpacks with script/server -- if
 that command succeeds, you then point your web browser to
 http://localhost:3000
 If it doesn't succeed, then you may need to install some dependencies.
 Sqlite3 is required along with Ruby 1.8.6 and Rubygems. Almost all other
 dependencies should be included with the archive, though if you install
 rails with Rubygems it will ensure that you have any missing dependencies.
 Taylor Singletary
 Developer Advocate, Twitter
 http://twitter.com/episod


 On Sun, May 9, 2010 at 10:47 AM, Z-13 y...@yandex.ru wrote:

 How use your OAuth Dancer tool?

 Thank you.




Re: [twitter-dev] Testing Twitter API webapps

2010-04-23 Thread Patrick Kennedy
Yes, Twitter requires a callback URL. Make a test page to display (or
save to file) your oAuth tokens.  Embed those tokens into your local
test page (and remove that helpful test page on hosted server).
Develop locally, and add if-then blocks, depending if you are local or
remote.  That way, you can develop locally, and upload same file, as
it will work for the remote as well.  When remote, instead of saved
tokens, use the live tokens from the handshake process.

~PK

On Fri, Apr 23, 2010 at 7:13 AM, kaps kap...@yahoo.com wrote:
 Hi,

 How do you folks test your Twitter apps before uploading them to your
 hosting servers?
 Doesn't the Twitter callback URL have to be a valid website?  How can
 we test locally?


 Thanks,
 kaps


 --
 Subscription settings: 
 http://groups.google.com/group/twitter-development-talk/subscribe?hl=en



Re: [twitter-dev] Testing Twitter API webapps

2010-04-23 Thread Patrick Kennedy
My explaination is more language agnostic, and works for an oauth web
flow.  But I like your RoR idea, and it sounds like there is support
for localhost development to some extent.  I suppose /authenticated
is the controller. How the terms dev, stage, prod fit into the rails
design paradigm is less clear.  Can you clarify that or provide a
simple example?

Thanks for any insights.  Patrick

On Sat, Apr 24, 2010 at 1:25 AM, philip crawford philipha...@gmail.com wrote:
 You can use a callback URL like the following to develop locally.

 http://dev.local:3000/authenticated

 Then put your dev, stage, prod callback URLs in a config.  Your app
 should work the same regardless of the server/environment it is
 running on.

 I also have different twitter accounts for dev/stage and prod.  My
 prod twitter account is http://twitter.com/imby while dev  stage are
 http://twitter.com/imbyTest  That way the @imby lists and feed does
 not contain test tweets and whatnot.  Again, this is contained in a
 config file so that prod = @imby and everything else = @imbyTest


 On Fri, Apr 23, 2010 at 12:19 PM, Patrick Kennedy kenned...@gmail.com wrote:
 Yes, Twitter requires a callback URL. Make a test page to display (or
 save to file) your oAuth tokens.  Embed those tokens into your local
 test page (and remove that helpful test page on hosted server).
 Develop locally, and add if-then blocks, depending if you are local or
 remote.  That way, you can develop locally, and upload same file, as
 it will work for the remote as well.  When remote, instead of saved
 tokens, use the live tokens from the handshake process.

 ~PK

 On Fri, Apr 23, 2010 at 7:13 AM, kaps kap...@yahoo.com wrote:
 Hi,

 How do you folks test your Twitter apps before uploading them to your
 hosting servers?
 Doesn't the Twitter callback URL have to be a valid website?  How can
 we test locally?


 Thanks,
 kaps


 --
 Subscription settings: 
 http://groups.google.com/group/twitter-development-talk/subscribe?hl=en





 --
 imby - in my back yard
 An Experiment in Local Professional Networking
 http://madison.imby.info/p/Philip.Crawford



Re: [twitter-dev] Strange problems with Twitter API

2010-04-23 Thread Patrick Kennedy
I also use epiTwitter. Using 'localhost' has worked for me, but
sometimes it breaks, and I now prefer 127.0.0.1.

As you note: after successful authentication with Twitter, it works
fine for the first time until page refresh.  This means the oauth
tokens are not saved into session variables, a database, or cookies
for next use, such as on a page refresh.  You need to save the tokens
for future access.

~Patrick

On Sat, Apr 24, 2010 at 11:20 AM, KPL kapil.sa...@gmail.com wrote:
 From past few days, I am trying to get the EpiTwitter library work for
 me. But, it is behaving in unusually.

 I am on Fedora 12 with PHP 5.3.2. It's my development box.

 Here are the issues I am facing.

 1.When I made a simple script with the method *getAuthenticateUrl* and
 accessed it from http://localhost/ , it wasn't working and threw
 errors(below) . But when I accidently tried http://127.0.01./ it
 worked.

 Fatal error: Uncaught exception 'EpiOAuthException' in /var/www/html/
 twitter/classes/EpiOAuth.php:397
 Stack trace:
 #0 /var/www/html/twitter/classes/EpiOAuth.php(367):
 EpiOAuthException::raise(Object(EpiCurlManager), false)
 #1
  /var/www/html/twitter/classes/EpiOAuth.php(39): EpiOAuthResponse-
__get('oauth_token')
 #2 /var/www/html/twitter/preview.php(34): EpiOAuth-
getAuthenticateUrl(NULL, Array)
 #3 {main}
  thrown in /var/www/html/twitter/classes/EpiOAuth.php on line 397


 2.After successful authentication, when returned to my script, it
 works fine for the first time,when it is actually redirected by
 Twitter.But when I refresh the page, it throws the following error -


 Fatal error: Uncaught exception 'EpiOAuthUnauthorizedException' in /
 var/www/html/twitter/classes/EpiOAuth.php:395
 Stack trace:
 #0 /var/www/html/twitter/classes/EpiOAuth.php(367):
 EpiOAuthException::raise(Object(EpiCurlManager), false)
 #1 /var/www/html/twitter/preview.php(48): EpiOAuthResponse-
__get('oauth_token')
 #2 {main}
  thrown in /var/www/html/twitter/classes/EpiOAuth.php on line 395

 Should this be problem with my server or cURL installation? When I
 checked phpinfo(), cURL was enabled, but when I had a look in
 Configure Command section, I saw this

 '--without-curl'

 Is there any relation of this with the errors?

 Also, I was unable to access the responseText and the try-catch
 combination with $e-getMessage(); didn't yeild any results.

 Thanks in advance for your help.

 Regards,
 Kapeel S




 --
 Subscription settings: 
 http://groups.google.com/group/twitter-development-talk/subscribe?hl=en



Re: [twitter-dev] open source twitter-text

2010-04-17 Thread Patrick Kennedy
I hate to leave things dangling - so, I suppose this is the best way
to use twitter-text ruby gem, as the twitter-text provides a Twitter
module layout  -

# Extraction
class MyClass
  attr_accessor :usernames
  def initialize
@usernames = Mentioning @biz and @jack
  end
end

$KCODE = 'u'
require 'rubygems'
require 'twitter-text'

include Twitter::Extractor
p = MyClass.new
puts extract_mentioned_screen_names( p.usernames )


On Sun, Apr 11, 2010 at 6:34 PM, Patrick Kennedy kenned...@gmail.com wrote:
 Actually, I can make it work like this -

 require 'rubygems'
 require 'lib/extractor'
 require 'lib/regex'

 include Twitter::Extractor
 usernames = extract_mentioned_screen_names(Mentioning @twitter and @jack)
 puts usernames
 # usernames = [twitter, jack]

 But I want to use classes like this -

 require 'rubygems'
 require 'unicode'
 $KCODE = 'KU'
 require 'twitter-text'

 class MyClass
    include Twitter::Extractor
    usernames = extract_mentioned_screen_names(Mentioning @twitter and @jack)
    puts usernames
 end

 m = MyClass.new



 On Sun, Apr 11, 2010 at 5:37 PM, Patrick kenned...@gmail.com wrote:

 The twitter open source code looks simple and fun -

 http://github.com/mzsanford/twitter-text-rb

 However, it seems I need to install unicode support.  On Linux, I was
 able to, though on Windows 7, I don't have nmake (don't have C++).
 Anyways, it still complains about setting $KCODE to utf8 or u (or
 using the -KU command line switch).  I tried both but can't seem to
 make it work.  Which gem do I need for unicode, and how can I set it
 programmatically?

 I tried ideas like this:

 require 'rubygems'
 require 'unicode'
 $KCODE = 'KU'


 --
 To unsubscribe, reply using remove me as the subject.




Re: [twitter-dev] Hovercards with blogger.js?

2010-04-15 Thread Patrick Kennedy
Example shows how to use hovercard in an HTML page.  Is there a way to
call from a javascript.js file?

If so, what is best approach for supporting both HTML and
javascript.js of same application when using @Anywhere?

On Thu, Apr 15, 2010 at 11:34 AM, Abraham Williams 4bra...@gmail.com wrote:
 Anywhere ignores already linked screen_names.
 Abraham

 On Thu, Apr 15, 2010 at 02:25, Jonah Grant grantjo...@gmail.com wrote:

 I'm using the blogger.js script on my site to display my latest
 tweets, but the usernames are hrefs, and @anywhere doesn't seem to
 recognize them and add a hovercard for them (it works on the rest of
 my site)



 --
 Abraham Williams | Developer for hire | http://abrah.am
 PoseurTech Labs | Projects | http://labs.poseurtech.com
 This email is: [ ] shareable [x] ask first [ ] private.



-- 
To unsubscribe, reply using remove me as the subject.


Re: [twitter-dev] public_timeline

2010-03-22 Thread Patrick Kennedy
Yes, it was announced here that they're keeping it.  Anyways, a cURL
request should be perfect for public_timeline tweets.

On Tue, Mar 23, 2010 at 7:44 AM, Josh Roesslein jroessl...@gmail.com wrote:
 I thought twitter was reconsidering keeping public timeline around.
 Not sure if there has been a final verdict yet.
 Josh

 On Sun, Mar 21, 2010 at 4:09 AM, Patrick kenned...@gmail.com wrote:

 Since pubic_timeline is not going to be deprecated, and since I am
 using epiTwitter for oAuth, how should I display public_timeline
 *before* user logs in?

 I want to sprouse up the logon page, and some public_timeline tweets
 would be perfect.  As I don't have an oAuth token to setToken( ) and
 make calls thru epiTwitter, is it okay to use basic auth type ideas
 for the public_timeline tweets as a good opener?

 To unsubscribe from this group, send email to
 twitter-development-talk+unsubscribegooglegroups.com or reply to this email
 with the words REMOVE ME as the subject.

 To unsubscribe from this group, send email to
 twitter-development-talk+unsubscribegooglegroups.com or reply to this email
 with the words REMOVE ME as the subject.


To unsubscribe from this group, send email to 
twitter-development-talk+unsubscribegooglegroups.com or reply to this email 
with the words REMOVE ME as the subject.


Re: [twitter-dev] Re: Send Cyrillic character (OAuth)

2010-03-20 Thread Patrick Kennedy
I'm new to Rails, and I am in process of studying this oauth example.
Since there is no index file entry point at /public, where is the
entry point of your oauth-dancer app?  This is a newbie question of
Rails, but it looks like a fun app for the oauth dancing purposes, and
I wanted to follow the logic.

Thanks.  Pat

On Thu, Mar 18, 2010 at 10:02 PM, Taylor Singletary
taylorsinglet...@twitter.com wrote:
 Hi Z-13,
 Using my OAuth Dancer tool ( http://bit.ly/oauth-dancer ), it's fairly easy
 to setup a test scenario where you're posting a status with Cyrillic
 characters, as long as you're using the UTF-8 representation.
 While I don't know what specific code you'll need to write for Adobe AIR,
 through the OAuth and HTTP request cycle, this is how it's represented:

 Full Request URI

 http://api.twitter.com/1/statuses/update.xml

 HTTP Method

 post

 Request Body

 status=тест+on+behalf+of+another

 Content-Type

 application/x-www-form-urlencoded

 Headers

 Content-Type: application/x-www-form-urlencoded

 The OAuth Dance

 Signature Base String

 POSThttp%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses%2Fupdate.xmloauth_consumer_key%3Dri8JxYK2ddwSV5xIUfNNvQ%26oauth_nonce%3Dn4uOLc7RCCf3PtKeEPpBiV1EdRXLyFAM72Q60J80w8s%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1268924223%26oauth_token%3D119476949-gF0B5O1Wwa2UqqIwopAhQtQVTzmfSIOSiHQS7Vf8%26oauth_version%3D1.0%26status%3D%25D1%2582%25D0%25B5%25D1%2581%25D1%2582%2520on%2520behalf%2520of%2520another

 Signature

 6FcKffKploa26usTJuoADrtqp9Y=

 Authorization Header

 OAuth oauth_nonce=n4uOLc7RCCf3PtKeEPpBiV1EdRXLyFAM72Q60J80w8s,
 oauth_signature_method=HMAC-SHA1, oauth_timestamp=1268924223,
 oauth_consumer_key=ri8JxYK2ddwSV5xIUfNNvQ,
 oauth_token=119476949-gF0B5O1Wwa2UqqIwopAhQtQVTzmfSIOSiHQS7Vf8,
 oauth_signature=6FcKffKploa26usTJuoADrtqp9Y%3D, oauth_version=1.0
 Notice the encoding on the signature base string. Here's the response you
 get back for a successful POST, which includes the special characters as
 UTF-8 entities:
  ?xml version=1.0 encoding=UTF-8?

 status
   created_atThu Mar 18 14:57:04 + 2010/created_at
   id10674682220/id
   text#1090;#1077;#1089;#1090; on behalf of another/text
   sourcelt;a href=quot;http://realitytechnicians.comquot;
 rel=quot;nofollowquot;gt;Crying Indianlt;/agt;/source
   truncatedfalse/truncated
   in_reply_to_status_id/in_reply_to_status_id
   in_reply_to_user_id/in_reply_to_user_id
   favoritedfalse/favorited
   in_reply_to_screen_name/in_reply_to_screen_name
   user
 id119476949/id
 nameOAuth Dancer/name
 screen_nameoauth_dancer/screen_name
 locationSan Francisco, CA/location
 description/description

 profile_image_urlhttp://a3.twimg.com/profile_images/730275945/oauth-dancer_normal.jpg/profile_image_url
 urlhttp://bit.ly/oauth-dancer/url
 protectedfalse/protected
 followers_count9/followers_count
 profile_background_colorC0DEED/profile_background_color
 profile_text_color33/profile_text_color
 profile_link_color0084B4/profile_link_color
 profile_sidebar_fill_colorDDEEF6/profile_sidebar_fill_color
 profile_sidebar_border_colorC0DEED/profile_sidebar_border_color
 friends_count11/friends_count
 created_atWed Mar 03 19:37:35 + 2010/created_at
 favourites_count0/favourites_count
 utc_offset/utc_offset
 time_zone/time_zone

 profile_background_image_urlhttp://a3.twimg.com/profile_background_images/80151733/oauth-dance.png/profile_background_image_url
 profile_background_tiletrue/profile_background_tile
 notificationsfalse/notifications
 geo_enabledfalse/geo_enabled
 verifiedfalse/verified
 followingfalse/following
 statuses_count17/statuses_count
 langen/lang
 contributors_enabledfalse/contributors_enabled
   /user
   geo/
   coordinates/
   place/
   contributors/
 /status

 Hope this helps you.
 Taylor Singletary
 Developer Advocate, Twitter
 http://twitter.com/episod


 On Thu, Mar 18, 2010 at 3:38 AM, Z-13 y...@yandex.ru wrote:

 Who can help me?



To unsubscribe from this group, send email to 
twitter-development-talk+unsubscribegooglegroups.com or reply to this email 
with the words REMOVE ME as the subject.


Re: [twitter-dev] Undefined Index Notice with PHP w/ statues/mentions method

2010-03-16 Thread Patrick Kennedy
That just means you have PHP set to display helpful errors, such as
the use of a variable that was not initialized before first use.  The
hosting service will likely have these errors turned off.  You can
edit the library and correct such notices, or you can just use them as
feedback on your locahost dev server.

~PK

On Wed, Mar 17, 2010 at 10:01 AM, Cassidy cassc...@gmail.com wrote:
 Like many others who post on these type of boards, I'm going to first
 mention that I'm a newb.

 Note: I'm using the PHP library TwtterLibPHP (http://github.com/jdp/
 twitterlibphp)

 I'm trying to pull out various pieces of information (in this case the
 user name) using the status/mentions method in the json format and
 while it works, it keeps giving me the followin g notice:

 Notice: Undefined index: screen_name in /opt/lampp/htdocs/xampp/
 twitter/index.php on line 18

 I searched online for an answer, some mentioned to just hide the
 notice, but that doesn't really fix it...anybody have an idea to
 resolve this?

 Thanks,
 Cassidy

 Here is my code snippet:

 ?php
 require_once('twitlib/twitter.lib.php');

 $username = 'theusername';
 $password = 'thepassword';

 $twitter = new Twitter($username, $password);

 $mentions = $twitter-getMentions(array('page'=1), 'json');

 $mentions_decode = json_decode($mentions);

 echo @ . $mentions_decode['screen_name'] .  just mentioned me; \
 \The line giving me the notice

 ?



Re: [twitter-dev] Re: Deprecating /statuses/public_timeline resource on 4/5/10

2010-03-03 Thread Patrick Kennedy
Because you're suppose to use home_timeline now, which has everything
public_timeline has, plus support for retweets.

~Patrick

On Thu, Mar 4, 2010 at 10:40 AM, Carlos carlosju...@gmail.com wrote:
 why?

 On Mar 3, 9:45 pm, Ryan Sarver rsar...@twitter.com wrote:
 This is an announcement that we will be deprecating the *
 /statuses/public_timeline* resource as of April 5th (4/5/10). Please let us
 know if there are any major concerns.

 Thanks, Ryan



Re: [twitter-dev] Re: Deprecating /statuses/public_timeline resource on 4/5/10

2010-03-03 Thread Patrick Kennedy
Ops. Was thinking about user_timeline v. home_timeline.  So,
public_timeline is now going away too.

On Thu, Mar 4, 2010 at 12:06 PM, Abraham Williams 4bra...@gmail.com wrote:
 One less method for Twitter to maintain when the data is available through
 the Streaming API.
 Abraham

 On Wed, Mar 3, 2010 at 20:21, Patrick Kennedy kenned...@gmail.com wrote:

 Because you're suppose to use home_timeline now, which has everything
 public_timeline has, plus support for retweets.

 ~Patrick

 On Thu, Mar 4, 2010 at 10:40 AM, Carlos carlosju...@gmail.com wrote:
  why?
 
  On Mar 3, 9:45 pm, Ryan Sarver rsar...@twitter.com wrote:
  This is an announcement that we will be deprecating the *
  /statuses/public_timeline* resource as of April 5th (4/5/10). Please
  let us
  know if there are any major concerns.
 
  Thanks, Ryan
 



 --
 Abraham Williams | Community Advocate | http://abrah.am
 TwitterOAuth | http://github.com/abraham/twitteroauth
 This email is: [ ] shareable [x] ask first [ ] private.



[twitter-dev] Basic Auth deprecation coming

2009-12-09 Thread Patrick Kennedy
With Basic Auth deprecation coming in June 2010, will developers have
a sand box way to use Basic Auth?  I mean, it's handy to develop and
understand code with Basic Auth, and then cut it over to oAuth. Any
ideas?