Re: [twitter-dev] TwitterOauth

2010-12-30 Thread Igor Kharin
Hello, Gary.

JSON parser says there's an error and he's obviously right. You should
notice that you're able to interact with API via JSON or XML. And as
far as I can see you're using some high-level interface which is
fetching XML end-point but assumes it's a JSON one. Even so, twitter
could not authenticate you and bugs may lay even deeply than that. I
think the best advice would be to double check your code or try
another lib.

On Sat, Dec 18, 2010 at 12:52 PM, Gary Zukowski  wrote:
> I’m getting the following error when trying to do a simple update_profile:
>
>
>
> client.update_profile(:url => '')
>
>
>
> JSON::ParserError: 665: unexpected token at ' encoding="UTF-8"?>
>
> 
>
>   /1/account/update_profile
>
>   Could not authenticate with OAuth.
>
> 
>
> '
>
>
>
> Any ideas?
>
>
>
> Thanks,
>
>
>
> Gary Zukowski
>
>
>
> --
> 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] Finding RT or replies

2010-12-21 Thread Igor Kharin
Hello, Stu.

Here's the method you are looking for:
http://dev.twitter.com/doc/get/statuses/:id/retweeted_by

On Sun, Dec 19, 2010 at 9:56 PM, Stu  wrote:
> Hi all,
> Just wondering if there is a section of the API, possibly in the REST
> API, that allows me to find all the replies and RTs to a given tweet?
> I'll have the ID of that tweet.  Am I able to pass this to the API
> somewhere?
>
> Thanks,
> S.
>
> --
> 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: Twitter rate limiting restricting my implementation

2010-12-02 Thread Igor Kharin
Well, I'm pretty sure you can use multiple accounts. So that when user
account limits gets exhausted you can switch to you app's one and
fetch the rest.

On Thu, Dec 2, 2010 at 8:57 PM, computerzworld  wrote:
> Hi,
>                    Thanks for your response. I have made a request
> before a week but its still not get approved. Is Twitter ignoring all
> requests? Or any other way can I make this work?
>
> Thanks.
>
> On Dec 2, 6:31 pm, Igor Kharin  wrote:
>> Hello. You may try to get your app whitelisted to bump up the 
>> limits:http://dev.twitter.com/pages/rate-limiting#whitelisting
>>
>> On Thu, Dec 2, 2010 at 6:57 PM, computerzworld  wrote:
>> > Hello,
>> >           I am implementing an application which will download users'
>> > friends & followers as csv so that they can have backup of their data
>> > but when I am making the API call, users API call limit is getting to
>> > zero as that user is having more than 100 friends and followers and
>> > limit of 350 is getting over in one shot. I am making two API calls at
>> > a time. One is friends/ids for retrieving friends' ids and form that I
>> > am fetching users details via users/show. Is there any other way in
>> > which I can be able to retrieve the list using streaming API or
>> > something else or increasing my limit? Also users/show function is
>> > retrieving data very much slow. I am getting stuck at this point.
>> > Please help me. 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
>
> --
> 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] Twitter rate limiting restricting my implementation

2010-12-02 Thread Igor Kharin
Hello. You may try to get your app whitelisted to bump up the limits:
http://dev.twitter.com/pages/rate-limiting#whitelisting

On Thu, Dec 2, 2010 at 6:57 PM, computerzworld  wrote:
> Hello,
>           I am implementing an application which will download users'
> friends & followers as csv so that they can have backup of their data
> but when I am making the API call, users API call limit is getting to
> zero as that user is having more than 100 friends and followers and
> limit of 350 is getting over in one shot. I am making two API calls at
> a time. One is friends/ids for retrieving friends' ids and form that I
> am fetching users details via users/show. Is there any other way in
> which I can be able to retrieve the list using streaming API or
> something else or increasing my limit? Also users/show function is
> retrieving data very much slow. I am getting stuck at this point.
> Please help me. 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
>

-- 
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] Where can I find the updated rate limit after OAuth?

2010-11-29 Thread Igor Kharin
All rate limited methods responses include X-Ratelimit-Remaining and
X-Ratelimit-Limit HTTP-headers, use them or
http://dev.twitter.com/doc/get/account/rate_limit_status

On Fri, Nov 26, 2010 at 1:55 PM, m36tb6ll  wrote:
>
> Hi! I am a newbie in the field and am working on my first twitter web
> app. I have created a variable loop timer using rate_limit_status
> which works well in maximizing the usage of the twitter API without
> going over the hourly limits.
>
> Now that I have incorporated OAuth, I was expecting to see the limit
> increase from 150 (unauthenticated requests) to 350 (authenticated
> requests). But, I am still seeing the 150 limit both in the response
> headers and Firebug when calling rate_limit_status API after OAuth.
>
> Is there something I'm missing here?
>
> Your help would be greatly appreciated. Thanks in advance...
>
> --
> 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: Twitter API

2010-11-29 Thread Igor Kharin
Once you authorized an user and got his access token you're free to
use all the API methods like statuses/mentions (replies):
http://dev.twitter.com/doc/get/statuses/mentions

Good luck!

On Mon, Nov 29, 2010 at 5:35 PM, Tom Callahan  wrote:
> Thank you very muchit worked :-)
>
> Can you also please help me in more thing : How can I fetch the tweet
> replies from somebody's account?
>
> On Nov 28, 6:22 pm, Igor Kharin  wrote:
>> Here's how "Sign in with Twitter" button 
>> works:http://dev.twitter.com/pages/sign_in_with_twitter
>>
>> For end-user is just like one-click operation, he doesn't need "to
>> generate the access token." All the magic comes from server-side. You
>> will need an access token for every account you working with. This is
>> just how OAuth works.
>>
>> On Fri, Nov 26, 2010 at 6:20 PM, Tom Callahan  
>> wrote:
>> > Hi All,
>>
>> > I am trying to develop a platform where I can allow people to login &
>> > add multiple twitter accounts. They will be able to post tweets, view
>> > posted tweets, view tweet replies etc.
>>
>> > I came to know that Basic Authentication has been stopped for Twitter
>> > API & so I am using oAuth to connect to Twitter.
>>
>> > I have registered my application inhttp://dev.twitter.com/apps&; have
>> > got the access token and access token secret. However, the way I see
>> > it now, for every Twitter account that gets added to my application,
>> > the user will have to generate the access token. This process is very
>> > complicated & is not user-friendly.
>>
>> > I am requesting you to please let me know how can I find a solution
>> > for the same where I can automatically get the access token for all
>> > the twitter accounts that gets added to my application. I have seen a
>> > similar process in use here -http://mediafunnel.com/
>>
>> > Please help me with this. Your support & cooperation will be highly
>> > appreciated.
>>
>> > Thanks in advance!!
>>
>> > Regards,
>> > 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
>
> --
> 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] Twitter API

2010-11-28 Thread Igor Kharin
Here's how "Sign in with Twitter" button works:
http://dev.twitter.com/pages/sign_in_with_twitter

For end-user is just like one-click operation, he doesn't need "to
generate the access token." All the magic comes from server-side. You
will need an access token for every account you working with. This is
just how OAuth works.

On Fri, Nov 26, 2010 at 6:20 PM, Tom Callahan  wrote:
> Hi All,
>
> I am trying to develop a platform where I can allow people to login &
> add multiple twitter accounts. They will be able to post tweets, view
> posted tweets, view tweet replies etc.
>
> I came to know that Basic Authentication has been stopped for Twitter
> API & so I am using oAuth to connect to Twitter.
>
> I have registered my application in http://dev.twitter.com/apps & have
> got the access token and access token secret. However, the way I see
> it now, for every Twitter account that gets added to my application,
> the user will have to generate the access token. This process is very
> complicated & is not user-friendly.
>
> I am requesting you to please let me know how can I find a solution
> for the same where I can automatically get the access token for all
> the twitter accounts that gets added to my application. I have seen a
> similar process in use here - http://mediafunnel.com/
>
> Please help me with this. Your support & cooperation will be highly
> appreciated.
>
> Thanks in advance!!
>
> Regards,
> 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
>

-- 
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] Error creating tweets by API

2010-11-26 Thread Igor Kharin
http://apiwiki.twitter.com/w/page/22554652/HTTP-Response-Codes-and-Errors

> 400 Bad Request: The request was invalid.  An accompanying error message will 
> explain why. This is the status code will be returned during rate limiting.
> 401 Unauthorized: Authentication credentials were missing or incorrect.

Response body may be helpful as well.

On Fri, Nov 26, 2010 at 3:08 AM, Luis Victor Quintas
 wrote:
> Hello everybody,
>
> I created an application using the Twitter API, the TwitVou.com. It is
> an application for creating invitations and see who will participate.
>
> Whenever you create an invitation or a user participates in an
> invitation, the application publishes a tweet.
>
> A few days ago that is no longer publishing the tweets, and returns
> the error 400 or 401. When I try to publish other texts, works
> normally by the API.
>
> Anyone know that it might be?
>
> Regards,
>
> Luís Victor Quintas
>
> --
> 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] Not able to get request token

2010-11-26 Thread Igor Kharin
Well, I see. First of all oauth_signature is HMAC hash of your
properly encoded query parameters, not oauth_token_secret. The idea is
that only your app and Twitter may know it. Don't ever send it!

Request token is like an authorization session ID, which you would
exchange for an access token (You may not know access token before
that, actually.) So, doublecheck
http://dev.twitter.com/doc/post/oauth/request_token, it requires no
authentication. All you need is to fetch oauth_request_token and
oauth_request_secret. If you already have an access token, like in
your example, you can work with all API's methods right away, but
don't forget provide valid oauth_signature.

Here's easily explained routine: http://dev.twitter.com/pages/auth
And more in-depth OAuth 1.0 info: http://tools.ietf.org/html/rfc5849

On Wed, Nov 24, 2010 at 10:38 AM, rajat  wrote:
> I am sending AJAX request to acquire a request token but getting 403
> Forbidden error. I am putting following example to show my approach
>
> Available info :
> ---
> 1. Consumer Key : abckey
> 2. Consumer secret : xyzsecret
> 3. Request token URL : https://api.twitter.com/oauth/request_token
> 4. Registered OAuth Callback URL : http://127.0.0.1/twitter/index.html
> 5. Access Token (oauth_token) : 1234-efghaccess
> 6. Access Token Secret (oauth_token_secret) : mnopqrstaccesssecret
>
> My Javascript code
> 
> var today = new Date();
> var ts = Math.round(today.getTime()/1000.0);
>
> xmlhttp=getxmlhttobject();
> url = "http://api.twitter.com/oauth/request_token";;
> xmlhttp.open("POST", url, true);
> xmlhttp.setRequestHeader("Authorization","OAuth oauth_nonce=
> \"126weOPUDSBLS02dXTlp5tYjv434FE9ALwKILYFIU\", oauth_signature_method=
> \"HMAC-SHA1\", oauth_timestamp=\""+ ts +"\", oauth_consumer_key=
> \"abckey\", oauth_token=\"1234-efghaccess\", oauth_signature=
> \"mnopqrstaccesssecret\" , oauth_version=\"1.0\"");
> xmlhttp.send(null);
> ---
> When i check live headers in mozilla i get status as 403 Forbidden
> error.
>
> Can anyone guide me where i am doing wrong..
>
> 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
>

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