[twitter-dev] Twitter API ME 1.5 released

2010-10-31 Thread Ernandes Jr.
Hi,

Just to announce that *Twitter API ME 1.5* has just been released.

In this new version, the following new features are available:

   - List of pending friends/followers request
   - Report spam
   - Retweets of me timeline
   - Trend Topics search
   - *Tweet's* entities
   - Retrieval of access token from UserAccountManager class

For further information on this new release, access www.twitterapime.com

Regards,

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


[twitter-dev] TwitterOAuth example gets 401 all the time

2010-10-31 Thread José Luis
Hi,

I'm trying TwitterOAuth's example but can't get it to authorize with
Twitter. It gets stuck all the the time in redirect.php with the
connection getting a 401 code all the time. I have set the consumer
key and secret in config.php as stated in the documentation and also
the oauth_callback. The credentials come from a registered app so they
should be correct.

I can't understand why I'm getting the 401s. Why may this be happening
and how could I fix it?

-- 
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: TwitterOAuth example gets 401 all the time

2010-10-31 Thread José Luis
I forgot to mention the URL I am using for the TwitterOAuth example is
not the same I used to register the application whose credentials I am
using. But I understand the URL for the app is registered just for
Twitter to know the application so this shouldn't pose any problem,
could it?

On 31 oct, 17:04, José Luis jlgon...@ya.com wrote:
 Hi,

 I'm trying TwitterOAuth's example but can't get it to authorize with
 Twitter. It gets stuck all the the time in redirect.php with the
 connection getting a 401 code all the time. I have set the consumer
 key and secret in config.php as stated in the documentation and also
 the oauth_callback. The credentials come from a registered app so they
 should be correct.

 I can't understand why I'm getting the 401s. Why may this be happening
 and how could I fix it?

-- 
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 Desktop Client app with Embedded Browser getting a 401 unauthorized when hitting home_timeline.json

2010-10-31 Thread DavidD
could never get around the home_timeline issue.
user_timeline works fine.

On Oct 27, 7:44 pm, Nick Bradbury nick.bradb...@gmail.com wrote:
 Check the text of the response - it may provide some clues as to where
 the problem is.

 On Oct 27, 6:30 pm, DavidD ddudl...@gmail.com wrote:







  I am using Oauth for Delphi from ChuckBeasley.com

  I am able to in order
  1) get a request token
  2) call with my callback url and put in my credentials.
  3) get redirected correctly to my callback url in a TEmbeddedWB
  component.
  4) get an access token (at least I believe I am) since screen_name and
  user_id come back in the response.

  Then when I try and pull my home_timeline it gives me a 401
  unauthorized as a response.

  What can I be doing wrong?

  Thanks David

-- 
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] Calling statuses/destroy/:id.format and getting a 401 unauthorized

2010-10-31 Thread DavidD
I have gone through Oauth Authentication requesting a token,
authorize, getting an access token, etc.

I have pulled all tweets for the user_timeline.xml
I then called http://api.twitter.com/version/statuses/destroy/.xml
and I get a 401 Unauthorized.
I went as far as trying to post with parameters from Oauth, and got
the same 401, even though I just got the entire set of tweets from a
user_timeline.

Do I have to pass the actual Status XML to delete?

Please help me.

Thanks,
David

-- 
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:Re:Re: [twitter-dev] xauth return Failed to validate oauth signature and token

2010-10-31 Thread engine.start
I need your help


At 2010-10-29 17:11:55,engine.start 477914...@163.com wrote:
Hi Tom,
Thanks for your reply, I have fix the problem you mentioned, but it still 
return Failed to validate oauth signature and token...

sigBase is ---
POSThttps%3A%2F%2Fapi.twitter.com%2Foauth%2Faccess_tokenoauth_consumer_key%3D###%26oauth_nonce%3D128834239529a%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1288342395%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth%26x_auth_password%3D##%26x_auth_username%3D#

oAuthHttpHeader is -
Authorization: OAuth 
oauth_consumer_key=#,oauth_nonce=128834239529a,oauth_signature=SVMgVYdS%2Bf%2FQXM8sNQKlC8FScSE%3D,oauth_signature_method=HMAC-SHA1,oauth_timestamp=1288342395,oauth_version=1.0

body is 
x_auth_mode%3Dclient_auth%26x_auth_password%3D#%26x_auth_username%3D##

modified code :
bool twitCurl::xAuthAccessToken()
{
bool retVal = false;
FILE *fp = fopen(/tmp/twitter/xauth,w);
std::string url(oAuthTwitterApiUrls::OAUTHLIB_TWITTER_ACCESS_TOKEN_URL);
   
if( isCurlInit() )
{
std::string body = x_auth_mode=client_authx_auth_password= + 
urlencode(m_twitterPassword) + x_auth_username= + 
urlencode(m_twitterUsername);

std::string dataStr();

dataStr = body;
   
url += (std::string(?) + body);

std::string oAuthHeader(  );
struct curl_slist* pOAuthHeaderList = NULL;
   
CURL* curlHandle = curl_easy_init();;
   
std::string localUrl = url;
size_t nPos = url.find_first_of( ? );
if( std::string::npos != nPos )
{
localUrl = url.substr( 0, nPos );   
}
   
   
std::string oAuthHttpHeader();
/* Set OAuth header */
m_oAuth.getOAuthHeader( eOAuthHttpPost, localUrl, dataStr, 
oAuthHttpHeader );
   
if( oAuthHttpHeader.length()  0 )
{
pOAuthHeaderList = curl_slist_append( pOAuthHeaderList, 
oAuthHttpHeader.c_str() );
if( pOAuthHeaderList )
{
curl_easy_setopt( curlHandle, CURLOPT_HTTPHEADER, 
pOAuthHeaderList );
}
}
   
/* Set http request, url and data */
curl_easy_setopt( curlHandle, CURLOPT_POST, 1 );
curl_easy_setopt( curlHandle, CURLOPT_USE_SSL, CURLUSESSL_CONTROL);
curl_easy_setopt( curlHandle, CURLOPT_SSLVERSION, 
CURL_SSLVERSION_SSLv3);
curl_easy_setopt( curlHandle, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt( curlHandle, CURLOPT_SSL_VERIFYHOST, 0L);
curl_easy_setopt( curlHandle, CURLOPT_URL, url.c_str() );
curl_easy_setopt( curlHandle, CURLOPT_WRITEFUNCTION, write_data );
curl_easy_setopt( curlHandle, CURLOPT_WRITEDATA, fp );
   
body = urlencode( body );
   
if( body.length() )
{
curl_easy_setopt( curlHandle, CURLOPT_COPYPOSTFIELDS, body.c_str() 
);
}
   
/* Send http request */
CURLcode code = curl_easy_perform( curlHandle );
if( code == CURLE_OK )
{
retVal = true;
}
else
{
retVal = false;
}
  
if( pOAuthHeaderList )
{
curl_slist_free_all( pOAuthHeaderList );
}
fclose(fp);
}
return retVal;
}

Thanks.






At 2010-10-29 16:27:13,Tom van der Woerdt i...@tvdw.eu wrote:

Your x_auth_* parameters aren't in your base string. This might cause it.

Tom


On Oct 29, 2010, at 6:10 AM, udta 477914...@163.com wrote:

 Hi,
 
 I am using libtwitcurl, and converting oAuth to xAuth, but I got
 Failed to validate oauth signature and token.
 I compare all I can printf data to libQtweet(xauth succesful), and
 couldn't found any error
 
 
 sigBase is:
 POSThttps%3A%2F%2Fapi.twitter.com%2Foauth
 %2Faccess_tokenoauth_consumer_key%3D**%26oauth_nonce
 %3D1288319703364%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
 %3D1288319703%26oauth_version%3D1.0
 
 oAuthHttpHeader is:
 Authorization: OAuth
 oauth_consumer_key=*,oauth_nonce=1288319703364,oauth_signature=SUlWtiHEc6wZJwiY9bZDgRkSyKE
 %3D,oauth_signature_method=HMAC-
 SHA1,oauth_timestamp=1288319703,oauth_version=1.0
 
 
 This is my code:
 
 bool twitCurl::xAuthAccessToken()
 {
bool retVal = false;
FILE *fp = fopen(/tmp/twitter/xauth,w);
std::string
 url(oAuthTwitterApiUrls::OAUTHLIB_TWITTER_ACCESS_TOKEN_URL);
 
if( isCurlInit() )
{
std::string body = x_auth_mode=client_authx_auth_password=
 + urlencode(m_twitterPassword) + x_auth_username= +
 urlencode(m_twitterUsername);
 
std::string dataStr();
 
dataStr = body;
 
url += (std::string(?) + body);
 
std::string oAuthHeader(  );
struct curl_slist* pOAuthHeaderList = NULL;
 
CURL* curlHandle = curl_easy_init();;
 

Re:Re:Re:Re: [twitter-dev] xauth return Failed to validate oauth signature and token

2010-10-31 Thread engine.start
I have tested the header by this way:
create header by twitcurl, and then use it in qtweetlib, it is OK,
but  fail when opposite.
So I think maybe the problem is how curl  openssl requesting token, but I have 
no idea about it


At 2010-11-01 09:07:01,engine.start 477914...@163.com wrote:
I need your help


At 2010-10-29 17:11:55,engine.start 477914...@163.com wrote:
Hi Tom,
Thanks for your reply, I have fix the problem you mentioned, but it still 
return Failed to validate oauth signature and token...

sigBase is ---
POSThttps%3A%2F%2Fapi.twitter.com%2Foauth%2Faccess_tokenoauth_consumer_key%3D###%26oauth_nonce%3D128834239529a%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1288342395%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth%26x_auth_password%3D##%26x_auth_username%3D#

oAuthHttpHeader is -
Authorization: OAuth 
oauth_consumer_key=#,oauth_nonce=128834239529a,oauth_signature=SVMgVYdS%2Bf%2FQXM8sNQKlC8FScSE%3D,oauth_signature_method=HMAC-SHA1,oauth_timestamp=1288342395,oauth_version=1.0

body is 
x_auth_mode%3Dclient_auth%26x_auth_password%3D#%26x_auth_username%3D##

modified code :
bool twitCurl::xAuthAccessToken()
{
bool retVal = false;
FILE *fp = fopen(/tmp/twitter/xauth,w);
std::string url(oAuthTwitterApiUrls::OAUTHLIB_TWITTER_ACCESS_TOKEN_URL);
   
if( isCurlInit() )
{
std::string body = x_auth_mode=client_authx_auth_password= + 
urlencode(m_twitterPassword) + x_auth_username= + 
urlencode(m_twitterUsername);

std::string dataStr();

dataStr = body;
   
url += (std::string(?) + body);

std::string oAuthHeader(  );
struct curl_slist* pOAuthHeaderList = NULL;
   
CURL* curlHandle = curl_easy_init();;
   
std::string localUrl = url;
size_t nPos = url.find_first_of( ? );
if( std::string::npos != nPos )
{
localUrl = url.substr( 0, nPos );   
}
   
   
std::string oAuthHttpHeader();
/* Set OAuth header */
m_oAuth.getOAuthHeader( eOAuthHttpPost, localUrl, dataStr, 
oAuthHttpHeader );
   
if( oAuthHttpHeader.length()  0 )
{
pOAuthHeaderList = curl_slist_append( pOAuthHeaderList, 
oAuthHttpHeader.c_str() );
if( pOAuthHeaderList )
{
curl_easy_setopt( curlHandle, CURLOPT_HTTPHEADER, 
pOAuthHeaderList );
}
}
   
/* Set http request, url and data */
curl_easy_setopt( curlHandle, CURLOPT_POST, 1 );
curl_easy_setopt( curlHandle, CURLOPT_USE_SSL, CURLUSESSL_CONTROL);
curl_easy_setopt( curlHandle, CURLOPT_SSLVERSION, 
CURL_SSLVERSION_SSLv3);
curl_easy_setopt( curlHandle, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt( curlHandle, CURLOPT_SSL_VERIFYHOST, 0L);
curl_easy_setopt( curlHandle, CURLOPT_URL, url.c_str() );
curl_easy_setopt( curlHandle, CURLOPT_WRITEFUNCTION, write_data );
curl_easy_setopt( curlHandle, CURLOPT_WRITEDATA, fp );
   
body = urlencode( body );
   
if( body.length() )
{
curl_easy_setopt( curlHandle, CURLOPT_COPYPOSTFIELDS, body.c_str() 
);
}
   
/* Send http request */
CURLcode code = curl_easy_perform( curlHandle );
if( code == CURLE_OK )
{
retVal = true;
}
else
{
retVal = false;
}
  
if( pOAuthHeaderList )
{
curl_slist_free_all( pOAuthHeaderList );
}
fclose(fp);
}
return retVal;
}

Thanks.






At 2010-10-29 16:27:13,Tom van der Woerdt i...@tvdw.eu wrote:

Your x_auth_* parameters aren't in your base string. This might cause it.

Tom


On Oct 29, 2010, at 6:10 AM, udta 477914...@163.com wrote:

 Hi,
 
 I am using libtwitcurl, and converting oAuth to xAuth, but I got
 Failed to validate oauth signature and token.
 I compare all I can printf data to libQtweet(xauth succesful), and
 couldn't found any error
 
 
 sigBase is:
 POSThttps%3A%2F%2Fapi.twitter.com%2Foauth
 %2Faccess_tokenoauth_consumer_key%3D**%26oauth_nonce
 %3D1288319703364%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
 %3D1288319703%26oauth_version%3D1.0
 
 oAuthHttpHeader is:
 Authorization: OAuth
 oauth_consumer_key=*,oauth_nonce=1288319703364,oauth_signature=SUlWtiHEc6wZJwiY9bZDgRkSyKE
 %3D,oauth_signature_method=HMAC-
 SHA1,oauth_timestamp=1288319703,oauth_version=1.0
 
 
 This is my code:
 
 bool twitCurl::xAuthAccessToken()
 {
bool retVal = false;
FILE *fp = fopen(/tmp/twitter/xauth,w);
std::string
 url(oAuthTwitterApiUrls::OAUTHLIB_TWITTER_ACCESS_TOKEN_URL);
 
if( isCurlInit() )
{
std::string body = x_auth_mode=client_authx_auth_password=
 + urlencode(m_twitterPassword) + x_auth_username= +
 

Re: [twitter-dev] Rate limit for streaming api (tracking keyword)

2010-10-31 Thread John Kalucki
http://dev.twitter.com/pages/streaming_api_concepts#filter-limiting
http://dev.twitter.com/pages/streaming_api_concepts#parsing-responses


On Thu, Oct 28, 2010 at 9:55 PM, Thiago Esteves thgeste...@gmail.comwrote:

 Hi,

 I am developing an application that needs to track a keyword on
 twitter, that keyword is a hashtag, the frequency of that keyword is
 not high, but the application needs to stay listening and don't stop
 never. What is the rate limit Twitter apply for this case? Could not
 find it on twitter devel pages.

 Thanks

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


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


Re: [twitter-dev] De-duplicating Site Streams

2010-10-31 Thread John Kalucki
Create two in-memory hash sets of seen ids. Write ids to both. If the id is
found on write, discard. Alternatively expire them every few tens of
 minutes to bound growth, but provide continuous coverage.

-John



On Tue, Oct 26, 2010 at 8:55 PM, Marc Mims marc.m...@gmail.com wrote:

 De-duplicating statuses in the Streaming API is fairly straightforward.
 But with Site Streams, where a single status might be received multiple
 times for multiple mentioned users, and/or as favorites, it is a bit
 more difficult.

 I'm wondering if anyone can offer advice on an efficient method for
 de-duplicating Site Streams.

-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


[twitter-dev] Re: Cann't create application b/c settings/connection tab is missing

2010-10-31 Thread K
ah.. that must hv changed recently? Great, I found it, thanks!!

On Oct 25, 7:59 am, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Hi,

 The best place to create applications and view your app settings is 
 onhttp://dev.twitter.com/apps-- just use your regular Twitter account.

 Taylor



 On Sat, Oct 23, 2010 at 2:34 AM, K kuts...@gmail.com wrote:
  Hey guys,
  I just created a new Twitter account, and I want to create application
  so that I can send tweets using the 3rd-party app I created. However,
  setting/connections tab is missing, thus I cannot go to developer page
  to create my app. What am I doing wrong?
  Thanks!!
  Kate

  --
  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- Hide quoted text -

 - Show quoted text -

-- 
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: TwitterOAuth example gets 401 all the time

2010-10-31 Thread Abraham Williams
Check to make sure the clock on the server/computer is correct. If it is off
by more then five minutes this is likely the problem.

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 Sun, Oct 31, 2010 at 09:13, José Luis jlgon...@ya.com wrote:

 I forgot to mention the URL I am using for the TwitterOAuth example is
 not the same I used to register the application whose credentials I am
 using. But I understand the URL for the app is registered just for
 Twitter to know the application so this shouldn't pose any problem,
 could it?

 On 31 oct, 17:04, José Luis jlgon...@ya.com wrote:
  Hi,
 
  I'm trying TwitterOAuth's example but can't get it to authorize with
  Twitter. It gets stuck all the the time in redirect.php with the
  connection getting a 401 code all the time. I have set the consumer
  key and secret in config.php as stated in the documentation and also
  the oauth_callback. The credentials come from a registered app so they
  should be correct.
 
  I can't understand why I'm getting the 401s. Why may this be happening
  and how could I fix it?

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