[twitter-dev] Re: users/lookup not working for JSON

2010-06-04 Thread Mo
It looks like things are working again.  Thanks unknown developer.  I
also noticed that the extensions (json,xml,atom) seem to be case-
sensitive.  I don't know how I got this far without noticing that.

On Jun 3, 9:04 pm, Mo maur...@moluv.com wrote:
 I might be overlooking something, but it seems like users/lookup isn't
 working.  I tried it using my app credentials and got the following
 message:

 {
   errors: [
     {
       code: 17,
       message: No user matches for specified terms
     }
   ]

 }

 Just to be sure, I went tohttp://dev.twitter.com/consoleand entered
 the parameters from the documentation

 http://api.twitter.com/1/users/lookup.xml?user_id=1401881,1401882http://api.twitter.com/1/users/lookup.xml?screen_name=dougw,raffi

 I tried

   1.   user_id in the left field and 1401881,1401882 then followed
 that unsuccessful attempt with
   2.   screen_name and dougw,raffi in the right field

 The second setting was attempted using both GET and POST with
 JSON selected as output, and I got the same message.

 After trying a bunch of combinations, using XML seemed to still work,
 but no more JSON.


[twitter-dev] Re: OAuth Echo problem in python

2010-06-04 Thread noki
Hi,

I also stacked on the TwitPic's OAuth Echo Protocol a week ago.

The point was making header just like to request Twitter.
1. make OAuth Header to request Account/Verify_credentials to get JSON
not XML  as result by GET method.
2. insert this header into X-Verify-Credentials-Authorization header
with realm.

You make verification request header, and TwitPic send it to Twitter
as you send in TwitPic site. Remember the OAuth Echo was just an echo
protocol.

The image file to send to TwitPic should be included as multipart/form-
data format.

I wrote a blog article for Ruby language and hope the code in the
article make some help.
--
Norio Suzuki


[twitter-dev] Re: OAuth Echo problem in python

2010-06-04 Thread noki
Ah, I forgot to include my blog URL.

http://postcard.blog.ocn.ne.jp/itazura/2010/05/twitpic_api_v2_.html

This was written in Japanese but you will find code to upload.


[twitter-dev] Re: Annotations Hackfest wiki page

2010-06-04 Thread glenn gillen
On Jun 3, 1:39 pm, mcintyre321 mcintyre...@gmail.com wrote:
 I would like to second aartiles call for better support. My team had a
 screen cast and were ready to do a remote presentation but we couldn't
 seem to get the message through (although we tweeted like crazy). Very
 very disappointing.

I suspect opening the doors for anyone to be involved (as opposed to
letting them just watch the stream) introduces a logistical nightmare
for people that are probably busy sorting technical difficulties at
the main event. I realise it's a slightly different scenario, but I
when Merbcamp broadcast live a few years ago there was a semi-official
outpost in London for those that wanted to take part. Perhaps having
officially sanctioned outposts in major cities would make things more
manageable, with a single local rep engaged to help curate questions,
presentations, and anything else that arises.

Just a thought,
--
Glenn Gillen
http://glenngillen.com/


Re: [twitter-dev] Re: Annotations with data types

2010-06-04 Thread André Luís
-1

Since the underscore is an acceptable char to variable/attribute
names, you would surely end up with unwanted type coercions... if a
developer chose _int for the last part of the attribute, it would
force coercion to integer... which you cannot be sure it's what he/she
wanted in the first place.

If this is really an issue (I'm still unconvinced it is), you need to
find another way of *explicitly* doing this.

For example:

location : {
   latitude: { type: 'xsd:float', value: '45.4' },
   longitude: 45
}

in this case it would specify:

lat: 45.4 (float)
long: 45 (int)
(since longitude opts for an implicit type specification)


--
André Luís
http://id.andr3.net/

On 4 June 2010 05:27, Harshad RJ harshad...@gmail.com wrote:

 On Fri, Jun 4, 2010 at 9:41 AM, Harshad RJ harshad...@gmail.com wrote:

 Suggestions for data-types:
 int : Integer
 float : Floating point number
 url : A well formed URL


 To add to this list of data-types:
 str: To force to a string

 Say, you have an attribute whose label ends with _int. So to force it to a
 string you could append _str.
 For example:

 xyz_int_str : Some string


 --
 Harshad RJ
 http://hrj.wikidot.com



Re: [twitter-dev] Re: Annotations with data types

2010-06-04 Thread Harshad RJ
Hi Andre,

I understand your concern. I was trying to propose one possible way of doing
things. I welcome other suggestions as well, but each will have its own
merits / demerits.

We first need to see if the concept of a data-type is really a concern. I
think it is a nice-to-have feature, as it will save repetitive checks across
the tens of thousands of twitter clients and their millions of instances.

To draw an analogy, imagine if the status_id in a tweet was not guaranteed
to be an integer. Every client would have to do a lot of boring /
inefficient checks for such a simple thing.

Now take that problem and blow it up a thousand fold with all sorts of
annotations being made across possibly co-operating but definitely
un-coordinated clients.

I personally don't prefer the suffixed label approach all that much. A
three-tuple or a hierarchial-tuple system like you suggested would be
better. But the suffixed label approach is the least disruptive to what has
already been defined.

cheers,
Harshad

2010/6/4 André Luís andreluis...@gmail.com

 -1

 Since the underscore is an acceptable char to variable/attribute
 names, you would surely end up with unwanted type coercions... if a
 developer chose _int for the last part of the attribute, it would
 force coercion to integer... which you cannot be sure it's what he/she
 wanted in the first place.

 If this is really an issue (I'm still unconvinced it is), you need to
 find another way of *explicitly* doing this.

 For example:

 location : {
   latitude: { type: 'xsd:float', value: '45.4' },
   longitude: 45
 }

 in this case it would specify:

 lat: 45.4 (float)
 long: 45 (int)
 (since longitude opts for an implicit type specification)




Re: [twitter-dev] Re: OAuth Echo problem in python

2010-06-04 Thread Yann Malet
Hello Zac,

I rewrote everything in my app based on python-oauth2 :
http://dpaste.com/203168/
The file is still hardcoded to ease the comprehension. I hope this will help
you to spot my issue.

The error message I get from twitpic is 400 bad request.
Regards,
--yml



class OAuthEchoRequest(oauth.Request):
def to_header(self, realm='http://api.twitter.com/'):
headers = super(OAuthEchoRequest, self).to_header(realm=realm)
return {'X-Verify-Credentials-Authorization':
headers['Authorization']}

@login_required
def twitpic_upload_photo(request):
if request.method == 'POST':
form = PhotoForm(request.POST, request.FILES)
if form.is_valid():
profile = Profile.objects.get(user=request.user)
token = oauth.Token(profile.oauth_token,
   profile.oauth_secret)

params = {
'oauth_consumer_key': settings.TWITTER_CONSUMER_KEY,
'oauth_signature_method':HMAC-SHA1,
'oauth_token':token.key,
'oauth_timestamp':oauth.generate_timestamp(),
'oauth_nonce':oauth.generate_nonce(),
'oauth_version':'1.0'
}

oauth_echo_request = OAuthEchoRequest(method=GET,

 url=settings.TWITTER_VERIFY_CREDENTIALS,
  #parameters=params
  )

 signature=oauth_echo_request.sign_request(oauth.SignatureMethod_HMAC_SHA1(),
consumer,
token)

headers = oauth_echo_request.to_header()
headers['X-Auth-Service-Provider'] =
settings.TWITTER_VERIFY_CREDENTIALS


#with multipart_encode
values = [
MultipartParam('key',value=settings.TWITPIC_API_KEY),

 MultipartParam('message',value=form.cleaned_data['message']),
MultipartParam('media',
   filename='copine_moi.jpg',
   filetype='image/jpeg',

fileobj=open(/home/yml/Desktop/copine_moi.jpg,rb))
]

register_openers()
datagen, heads = multipart_encode(values)
headers.update(heads)
req = urllib2.Request(settings.TWITPIC_API_URL, datagen,
headers)
# Post to netcat
#req = urllib2.Request(http://127.0.0.1:9000;, datagen,
headers)

#with urlencode
#values = {}
#values['key'] = MultipartParam(settings.TWITPIC_API_KEY)
#values['message'] =
MultipartParam(form.cleaned_data['message'])
#values['media'] = open(/home/yml/Desktop/copine_moi.jpg,
rb).read()
#data = urllib.urlencode(values)
#req = urllib2.Request(settings.TWITPIC_API_URL, data, headers)


response = urllib2.urlopen(req)

return HttpResponse(the photo is posted)
else:
form = PhotoForm()

return direct_to_template(request,
  twitter_integration/photo_form.html,
  {form:form,})


On Thu, Jun 3, 2010 at 10:48 PM, Zac Bowling zbowl...@gmail.com wrote:

 Hi Yann,

 I don't see anything obvious that stands out as wrong to me in your
 implementation from just looking at it, but I'm not sure. I do have OAuth
 Echo code working for Twitpic but using the OAuth2 library. If you don't
 figure out an answer, you can hit me up off the list and I'll see if I
 separate our version so it works independently and I'll post it on gist for
 you.

 If you want to upgrade though to python-oauth2, the biggest change is
 swapping out your imports to use oauth2 instead of oauth and removing the
 OAuth prefix on all the class names.

 For example:
   import oauth
   oauth.OAuthRequest(...)
   oauth.OAuthToken(...)

 becomes:
   import oauth2
   oauth2.Request(...)
   oauth2.Token(...)

 etc...

 Most of the API that you care about is identical from there. The library
 has evolved a bit but it should be obvious and most of the public methods
 remained the same. In my fork, I've fixed a few issues and added some
 changes to support XAuth and a few other minor issues (like forcing
 Authentication headers on POSTs for Twitter).

 Zac Bowling
 @zbowling




 On Jun 3, 2010, at 6:37 PM, Yann Malet wrote:

 Zac,
 I would love to do this but I can't find any documentation on how to do
 Oauth Echo with python-oauth2. I would gladly switch to python-ouath2 if I
 could find some code showing How to use it to post a picture on twitpic :
 http://dev.twitpic.com/docs/2/upload/

 http://dev.twitpic.com/docs/2/upload/Any help would be greatly
 appreciated.
 Regards,
 --yml

 On Thu, Jun 3, 2010 at 7:41 PM, Zac Bowling zbowl...@gmail.com wrote:

 It may not help fix your problem but I would recommend upgrading to the
 python-oauth2 library. (Don't be confused by the name; it's not an oauth 2.0
 library, but just the next generation of the original oauth 1.0a library
 that Leah Culver 

Re: [twitter-dev] Re: OAuth Echo problem in python

2010-06-04 Thread Yann Malet
If I send this request to 127.0.0.1:9000 without the file here it is the
string I can observe :


(ve)y...@yml-laptop:jess3$ netcat -l -p 9000
POST / HTTP/1.1
Accept-Encoding: identity
Content-Length: 377
X-Auth-Service-Provider:
https://api.twitter.com/1/account/verify_credentials.json
Host: 127.0.0.1:9000
User-Agent: Python-urllib/2.6
Connection: close
Content-Type: multipart/form-data; boundary=a45bd25da2844dac81003987b3c19e18
X-Verify-Credentials-Authorization: OAuth realm=http://api.twitter.com/;,
oauth_signature_method=HMAC-SHA1,
oauth_consumer_key=y2hEqGNEmyjU2De3hNcg,
oauth_token=90476798-5VZeNLpXUCaJ06UaWve2c4JVfdcJj5D4r21JxUFM,
oauth_signature=NMPlU4cRYl0b6jbQJ1xGXaZ5%2FpM%3D

--a45bd25da2844dac81003987b3c19e18
Content-Disposition: form-data; name=key
Content-Type: text/plain; charset=utf-8
Content-Length: 32

4bb040d1ec65427f8038cdd60a12cde2
--a45bd25da2844dac81003987b3c19e18
Content-Disposition: form-data; name=message
Content-Type: text/plain; charset=utf-8
Content-Length: 13

copine et moi
--a45bd25da2844dac81003987b3c19e18--
^C
(ve)y...@yml-laptop:jess3$



Does any one can spot the issue ?
Regards,
--yml

On Fri, Jun 4, 2010 at 9:14 AM, Yann Malet yann.ma...@gmail.com wrote:

 Hello Zac,

 I rewrote everything in my app based on python-oauth2 :
 http://dpaste.com/203168/
 The file is still hardcoded to ease the comprehension. I hope this will
 help you to spot my issue.

 The error message I get from twitpic is 400 bad request.
 Regards,
 --yml


 
 class OAuthEchoRequest(oauth.Request):
  def to_header(self, realm='http://api.twitter.com/'):
 headers = super(OAuthEchoRequest, self).to_header(realm=realm)
 return {'X-Verify-Credentials-Authorization':
 headers['Authorization']}

 @login_required
 def twitpic_upload_photo(request):
 if request.method == 'POST':
 form = PhotoForm(request.POST, request.FILES)
 if form.is_valid():
 profile = Profile.objects.get(user=request.user)
 token = oauth.Token(profile.oauth_token,
profile.oauth_secret)

 params = {
 'oauth_consumer_key': settings.TWITTER_CONSUMER_KEY,
 'oauth_signature_method':HMAC-SHA1,
 'oauth_token':token.key,
  'oauth_timestamp':oauth.generate_timestamp(),
 'oauth_nonce':oauth.generate_nonce(),
 'oauth_version':'1.0'
 }

 oauth_echo_request = OAuthEchoRequest(method=GET,

  url=settings.TWITTER_VERIFY_CREDENTIALS,
   #parameters=params
   )

  signature=oauth_echo_request.sign_request(oauth.SignatureMethod_HMAC_SHA1(),
 consumer,
 token)

 headers = oauth_echo_request.to_header()
 headers['X-Auth-Service-Provider'] =
 settings.TWITTER_VERIFY_CREDENTIALS


 #with multipart_encode
 values = [
 MultipartParam('key',value=settings.TWITPIC_API_KEY),

  MultipartParam('message',value=form.cleaned_data['message']),
 MultipartParam('media',
filename='copine_moi.jpg',
filetype='image/jpeg',

 fileobj=open(/home/yml/Desktop/copine_moi.jpg,rb))
 ]

 register_openers()
 datagen, heads = multipart_encode(values)
 headers.update(heads)
 req = urllib2.Request(settings.TWITPIC_API_URL, datagen,
 headers)
 # Post to netcat
 #req = urllib2.Request(http://127.0.0.1:9000;, datagen,
 headers)

 #with urlencode
 #values = {}
 #values['key'] = MultipartParam(settings.TWITPIC_API_KEY)
 #values['message'] =
 MultipartParam(form.cleaned_data['message'])
 #values['media'] = open(/home/yml/Desktop/copine_moi.jpg,
 rb).read()
 #data = urllib.urlencode(values)
 #req = urllib2.Request(settings.TWITPIC_API_URL, data, headers)


 response = urllib2.urlopen(req)

 return HttpResponse(the photo is posted)
 else:
 form = PhotoForm()

 return direct_to_template(request,
   twitter_integration/photo_form.html,
   {form:form,})
 

 On Thu, Jun 3, 2010 at 10:48 PM, Zac Bowling zbowl...@gmail.com wrote:

 Hi Yann,

 I don't see anything obvious that stands out as wrong to me in your
 implementation from just looking at it, but I'm not sure. I do have OAuth
 Echo code working for Twitpic but using the OAuth2 library. If you don't
 figure out an answer, you can hit me up off the list and I'll see if I
 separate our version so it works independently and I'll post it on gist for
 you.

 If you want to upgrade though to python-oauth2, the biggest change is
 swapping out your imports to use oauth2 instead of oauth and removing the
 OAuth 

[twitter-dev] Re: OAuth Echo problem in python

2010-06-04 Thread Steve C
Twitpic will only 400 Bad Request you if it can't find the image in
your multipart/form-
data or if the image is invalid (not jpg/png/gif or 5MB in size).

Thanks,

Steve C
Twitpic

On Jun 4, 9:20 am, Yann Malet yann.ma...@gmail.com wrote:
 If I send this request to 127.0.0.1:9000 without the file here it is the
 string I can observe :

 
 (ve)y...@yml-laptop:jess3$ netcat -l -p 9000
 POST / HTTP/1.1
 Accept-Encoding: identity
 Content-Length: 377
 X-Auth-Service-Provider:https://api.twitter.com/1/account/verify_credentials.json
 Host: 127.0.0.1:9000
 User-Agent: Python-urllib/2.6
 Connection: close
 Content-Type: multipart/form-data; boundary=a45bd25da2844dac81003987b3c19e18
 X-Verify-Credentials-Authorization: OAuth realm=http://api.twitter.com/;,
 oauth_signature_method=HMAC-SHA1,
 oauth_consumer_key=y2hEqGNEmyjU2De3hNcg,
 oauth_token=90476798-5VZeNLpXUCaJ06UaWve2c4JVfdcJj5D4r21JxUFM,
 oauth_signature=NMPlU4cRYl0b6jbQJ1xGXaZ5%2FpM%3D

 --a45bd25da2844dac81003987b3c19e18
 Content-Disposition: form-data; name=key
 Content-Type: text/plain; charset=utf-8
 Content-Length: 32

 4bb040d1ec65427f8038cdd60a12cde2
 --a45bd25da2844dac81003987b3c19e18
 Content-Disposition: form-data; name=message
 Content-Type: text/plain; charset=utf-8
 Content-Length: 13

 copine et moi
 --a45bd25da2844dac81003987b3c19e18--
 ^C
 (ve)y...@yml-laptop:jess3$

 

 Does any one can spot the issue ?
 Regards,
 --yml



 On Fri, Jun 4, 2010 at 9:14 AM, Yann Malet yann.ma...@gmail.com wrote:
  Hello Zac,

  I rewrote everything in my app based on python-oauth2 :
 http://dpaste.com/203168/
  The file is still hardcoded to ease the comprehension. I hope this will
  help you to spot my issue.

  The error message I get from twitpic is 400 bad request.
  Regards,
  --yml

  
  class OAuthEchoRequest(oauth.Request):
       def to_header(self, realm='http://api.twitter.com/'):
          headers = super(OAuthEchoRequest, self).to_header(realm=realm)
          return {'X-Verify-Credentials-Authorization':
  headers['Authorization']}

  @login_required
  def twitpic_upload_photo(request):
      if request.method == 'POST':
          form = PhotoForm(request.POST, request.FILES)
          if form.is_valid():
              profile = Profile.objects.get(user=request.user)
              token = oauth.Token(profile.oauth_token,
                                 profile.oauth_secret)

              params = {
                  'oauth_consumer_key': settings.TWITTER_CONSUMER_KEY,
                  'oauth_signature_method':HMAC-SHA1,
                  'oauth_token':token.key,
                   'oauth_timestamp':oauth.generate_timestamp(),
                  'oauth_nonce':oauth.generate_nonce(),
                  'oauth_version':'1.0'
              }

              oauth_echo_request = OAuthEchoRequest(method=GET,

   url=settings.TWITTER_VERIFY_CREDENTIALS,
                                            #parameters=params
                                            )

   signature=oauth_echo_request.sign_request(oauth.SignatureMethod_HMAC_SHA1()
   ,
  consumer,
                                      token)

              headers = oauth_echo_request.to_header()
              headers['X-Auth-Service-Provider'] =
  settings.TWITTER_VERIFY_CREDENTIALS

              #with multipart_encode
              values = [
                  MultipartParam('key',value=settings.TWITPIC_API_KEY),

   MultipartParam('message',value=form.cleaned_data['message']),
                  MultipartParam('media',
                                 filename='copine_moi.jpg',
                                 filetype='image/jpeg',

  fileobj=open(/home/yml/Desktop/copine_moi.jpg,rb))
              ]

              register_openers()
              datagen, heads = multipart_encode(values)
              headers.update(heads)
              req = urllib2.Request(settings.TWITPIC_API_URL, datagen,
  headers)
              # Post to netcat
              #req = urllib2.Request(http://127.0.0.1:9000;, datagen,
  headers)

              #with urlencode
              #values = {}
              #values['key'] = MultipartParam(settings.TWITPIC_API_KEY)
              #values['message'] =
  MultipartParam(form.cleaned_data['message'])
              #values['media'] = open(/home/yml/Desktop/copine_moi.jpg,
  rb).read()
              #data = urllib.urlencode(values)
              #req = urllib2.Request(settings.TWITPIC_API_URL, data, headers)

              response = urllib2.urlopen(req)

              return HttpResponse(the photo is posted)
      else:
          form = PhotoForm()

      return direct_to_template(request,
                                twitter_integration/photo_form.html,
                                {form:form,})
  

  On Thu, Jun 3, 2010 at 10:48 PM, Zac Bowling zbowl...@gmail.com wrote:

  Hi Yann,

  I don't see anything obvious that stands out as wrong to me in your
  implementation from just looking at it, but I'm not sure. I do have OAuth
  Echo code working for Twitpic 

[twitter-dev] Window.open twitter.com doesnt work inIE6

2010-06-04 Thread tweetphp
THis simple javascript code does not work in IE6 :window.open('http://
twitter.com', '', 'resizable,scrollbars')
Can anybody help?


[twitter-dev] Profile Image

2010-06-04 Thread Erphan Rajput
Hi,

Do I have to make a HTTP Request with OAuth Tokens to get Bigger
Profile Image.

Regards,
Erphan Rajput.


[twitter-dev] oh no the http://twitter.com/home?status=yourTweet has stopped functioning when not logged in

2010-06-04 Thread tomo661
Hey all,

Just noticed a slight issue, the http://twitter.com/home?status=yourTweet
use to auto fill in the tweet update field if a user was logged in or
not.

now it works fine if you are logged in, but if your not it calls the
login page (as before) but after you have logged in the tweet field is
not auto filled and it looks like the tweet string in the url is not
getting passed through the login process (ie removed when on the users
home page).

Any idea if there is a way round this as this was a really handy
feature and would be great to still be able to use (going to be a bit
hard to keep in if only logged in users can make use).

Thanks loads for your help :-)

Tomo


[twitter-dev] Cannot obtain access token for authenticated user when a callback url is sent

2010-06-04 Thread avinash
Hi,
I'm working on a web app(interacts with twitter) which uses an oauth
protocol for user authorisation. I had registered my app at twitter
with a specified callback url. But while I make an request I override
it by binding  oauth_callback parameter in my request header. It works
fine till user authorization is concerned but I'm not able to obtain
the authenticated user's access token.

But however if I do not override the callback url everything works
fine.

Please could you suggest where am I going on?Highlight some pointers
so that I could resolve the issue.

Avinash


Re: [twitter-dev] Cannot obtain access token for authenticated user when a callback url is sent

2010-06-04 Thread Taylor Singletary
Could you share some of the steps of your request while setting your
oauth_callback?

  * Signature Base String
  * Your Authorization header
  * Any POST body you are sending
  * The exact URL you are executing

What happens when you complete the authorization step? What specifically
does not happen?

Taylor Singletary
Developer Advocate, Twitter
http://twitter.com/episod


On Fri, Jun 4, 2010 at 6:08 AM, avinash avinash...@gmail.com wrote:

 Hi,
 I'm working on a web app(interacts with twitter) which uses an oauth
 protocol for user authorisation. I had registered my app at twitter
 with a specified callback url. But while I make an request I override
 it by binding  oauth_callback parameter in my request header. It works
 fine till user authorization is concerned but I'm not able to obtain
 the authenticated user's access token.

 But however if I do not override the callback url everything works
 fine.

 Please could you suggest where am I going on?Highlight some pointers
 so that I could resolve the issue.

 Avinash



Re: [twitter-dev] oh no the http://twitter.com/home?status=yourTweet has stopped functioning when not logged in

2010-06-04 Thread Taylor Singletary
We're aware of this bug and will have it fixed soon.  You can track the bug
here: http://bit.ly/czBS7L

Taylor Singletary
Developer Advocate, Twitter
http://twitter.com/episod


On Fri, Jun 4, 2010 at 2:22 AM, tomo661 t...@flashtalking.com wrote:

 Hey all,

 Just noticed a slight issue, the http://twitter.com/home?status=yourTweet
 use to auto fill in the tweet update field if a user was logged in or
 not.

 now it works fine if you are logged in, but if your not it calls the
 login page (as before) but after you have logged in the tweet field is
 not auto filled and it looks like the tweet string in the url is not
 getting passed through the login process (ie removed when on the users
 home page).

 Any idea if there is a way round this as this was a really handy
 feature and would be great to still be able to use (going to be a bit
 hard to keep in if only logged in users can make use).

 Thanks loads for your help :-)

 Tomo



Re: [twitter-dev] Re: OAuth Echo problem in python

2010-06-04 Thread Yann Malet
Steve,
The image is only 33.7kb and it is  a jpg.
Do you have any python sample code for the ?
Regards,
--yml

On Fri, Jun 4, 2010 at 9:38 AM, Steve C st...@twitpic.com wrote:

 Twitpic will only 400 Bad Request you if it can't find the image in
 your multipart/form-
 data or if the image is invalid (not jpg/png/gif or 5MB in size).

 Thanks,

 Steve C
 Twitpic

 On Jun 4, 9:20 am, Yann Malet yann.ma...@gmail.com wrote:
  If I send this request to 127.0.0.1:9000 without the file here it is the
  string I can observe :
 
  
  (ve)y...@yml-laptop:jess3$ netcat -l -p 9000
  POST / HTTP/1.1
  Accept-Encoding: identity
  Content-Length: 377
  X-Auth-Service-Provider:
 https://api.twitter.com/1/account/verify_credentials.json
  Host: 127.0.0.1:9000
  User-Agent: Python-urllib/2.6
  Connection: close
  Content-Type: multipart/form-data;
 boundary=a45bd25da2844dac81003987b3c19e18
  X-Verify-Credentials-Authorization: OAuth realm=http://api.twitter.com/
 ,
  oauth_signature_method=HMAC-SHA1,
  oauth_consumer_key=y2hEqGNEmyjU2De3hNcg,
  oauth_token=90476798-5VZeNLpXUCaJ06UaWve2c4JVfdcJj5D4r21JxUFM,
  oauth_signature=NMPlU4cRYl0b6jbQJ1xGXaZ5%2FpM%3D
 
  --a45bd25da2844dac81003987b3c19e18
  Content-Disposition: form-data; name=key
  Content-Type: text/plain; charset=utf-8
  Content-Length: 32
 
  4bb040d1ec65427f8038cdd60a12cde2
  --a45bd25da2844dac81003987b3c19e18
  Content-Disposition: form-data; name=message
  Content-Type: text/plain; charset=utf-8
  Content-Length: 13
 
  copine et moi
  --a45bd25da2844dac81003987b3c19e18--
  ^C
  (ve)y...@yml-laptop:jess3$
 
  
 
  Does any one can spot the issue ?
  Regards,
  --yml
 
 
 
  On Fri, Jun 4, 2010 at 9:14 AM, Yann Malet yann.ma...@gmail.com wrote:
   Hello Zac,
 
   I rewrote everything in my app based on python-oauth2 :
  http://dpaste.com/203168/
   The file is still hardcoded to ease the comprehension. I hope this will
   help you to spot my issue.
 
   The error message I get from twitpic is 400 bad request.
   Regards,
   --yml
 
   
   class OAuthEchoRequest(oauth.Request):
def to_header(self, realm='http://api.twitter.com/'):
   headers = super(OAuthEchoRequest, self).to_header(realm=realm)
   return {'X-Verify-Credentials-Authorization':
   headers['Authorization']}
 
   @login_required
   def twitpic_upload_photo(request):
   if request.method == 'POST':
   form = PhotoForm(request.POST, request.FILES)
   if form.is_valid():
   profile = Profile.objects.get(user=request.user)
   token = oauth.Token(profile.oauth_token,
  profile.oauth_secret)
 
   params = {
   'oauth_consumer_key': settings.TWITTER_CONSUMER_KEY,
   'oauth_signature_method':HMAC-SHA1,
   'oauth_token':token.key,
'oauth_timestamp':oauth.generate_timestamp(),
   'oauth_nonce':oauth.generate_nonce(),
   'oauth_version':'1.0'
   }
 
   oauth_echo_request = OAuthEchoRequest(method=GET,
 
url=settings.TWITTER_VERIFY_CREDENTIALS,
 #parameters=params
 )
 
  
  signature=oauth_echo_request.sign_request(oauth.SignatureMethod_HMAC_SHA1()
 ,
   consumer,
   token)
 
   headers = oauth_echo_request.to_header()
   headers['X-Auth-Service-Provider'] =
   settings.TWITTER_VERIFY_CREDENTIALS
 
   #with multipart_encode
   values = [
   MultipartParam('key',value=settings.TWITPIC_API_KEY),
 
MultipartParam('message',value=form.cleaned_data['message']),
   MultipartParam('media',
  filename='copine_moi.jpg',
  filetype='image/jpeg',
 
   fileobj=open(/home/yml/Desktop/copine_moi.jpg,rb))
   ]
 
   register_openers()
   datagen, heads = multipart_encode(values)
   headers.update(heads)
   req = urllib2.Request(settings.TWITPIC_API_URL, datagen,
   headers)
   # Post to netcat
   #req = urllib2.Request(http://127.0.0.1:9000;, datagen,
   headers)
 
   #with urlencode
   #values = {}
   #values['key'] = MultipartParam(settings.TWITPIC_API_KEY)
   #values['message'] =
   MultipartParam(form.cleaned_data['message'])
   #values['media'] = open(/home/yml/Desktop/copine_moi.jpg,
   rb).read()
   #data = urllib.urlencode(values)
   #req = urllib2.Request(settings.TWITPIC_API_URL, data,
 headers)
 
   response = urllib2.urlopen(req)
 
   return HttpResponse(the photo is posted)
   else:
   form = PhotoForm()
 
   return direct_to_template(request,
 

Re: [twitter-dev] Re: OAuth Echo problem in python

2010-06-04 Thread Yann Malet
I have just uploaded the same image using the web interface :
http://twitpic.com/1ttrlu
http://twitpic.com/1ttrludo you have any recommendation ? On how to solve
this issue.
 http://twitpic.com/1ttrluRegards,
--yml

On Fri, Jun 4, 2010 at 9:56 AM, Yann Malet yann.ma...@gmail.com wrote:

 Steve,
 The image is only 33.7kb and it is  a jpg.
 Do you have any python sample code for the ?
 Regards,
 --yml


 On Fri, Jun 4, 2010 at 9:38 AM, Steve C st...@twitpic.com wrote:

 Twitpic will only 400 Bad Request you if it can't find the image in
 your multipart/form-
 data or if the image is invalid (not jpg/png/gif or 5MB in size).

 Thanks,

 Steve C
 Twitpic

 On Jun 4, 9:20 am, Yann Malet yann.ma...@gmail.com wrote:
  If I send this request to 127.0.0.1:9000 without the file here it is
 the
  string I can observe :
 
  
  (ve)y...@yml-laptop:jess3$ netcat -l -p 9000
  POST / HTTP/1.1
  Accept-Encoding: identity
  Content-Length: 377
  X-Auth-Service-Provider:
 https://api.twitter.com/1/account/verify_credentials.json
  Host: 127.0.0.1:9000
  User-Agent: Python-urllib/2.6
  Connection: close
  Content-Type: multipart/form-data;
 boundary=a45bd25da2844dac81003987b3c19e18
  X-Verify-Credentials-Authorization: OAuth realm=
 http://api.twitter.com/;,
  oauth_signature_method=HMAC-SHA1,
  oauth_consumer_key=y2hEqGNEmyjU2De3hNcg,
  oauth_token=90476798-5VZeNLpXUCaJ06UaWve2c4JVfdcJj5D4r21JxUFM,
  oauth_signature=NMPlU4cRYl0b6jbQJ1xGXaZ5%2FpM%3D
 
  --a45bd25da2844dac81003987b3c19e18
  Content-Disposition: form-data; name=key
  Content-Type: text/plain; charset=utf-8
  Content-Length: 32
 
  4bb040d1ec65427f8038cdd60a12cde2
  --a45bd25da2844dac81003987b3c19e18
  Content-Disposition: form-data; name=message
  Content-Type: text/plain; charset=utf-8
  Content-Length: 13
 
  copine et moi
  --a45bd25da2844dac81003987b3c19e18--
  ^C
  (ve)y...@yml-laptop:jess3$
 
  
 
  Does any one can spot the issue ?
  Regards,
  --yml
 
 
 
  On Fri, Jun 4, 2010 at 9:14 AM, Yann Malet yann.ma...@gmail.com
 wrote:
   Hello Zac,
 
   I rewrote everything in my app based on python-oauth2 :
  http://dpaste.com/203168/
   The file is still hardcoded to ease the comprehension. I hope this
 will
   help you to spot my issue.
 
   The error message I get from twitpic is 400 bad request.
   Regards,
   --yml
 
   
   class OAuthEchoRequest(oauth.Request):
def to_header(self, realm='http://api.twitter.com/'):
   headers = super(OAuthEchoRequest, self).to_header(realm=realm)
   return {'X-Verify-Credentials-Authorization':
   headers['Authorization']}
 
   @login_required
   def twitpic_upload_photo(request):
   if request.method == 'POST':
   form = PhotoForm(request.POST, request.FILES)
   if form.is_valid():
   profile = Profile.objects.get(user=request.user)
   token = oauth.Token(profile.oauth_token,
  profile.oauth_secret)
 
   params = {
   'oauth_consumer_key': settings.TWITTER_CONSUMER_KEY,
   'oauth_signature_method':HMAC-SHA1,
   'oauth_token':token.key,
'oauth_timestamp':oauth.generate_timestamp(),
   'oauth_nonce':oauth.generate_nonce(),
   'oauth_version':'1.0'
   }
 
   oauth_echo_request = OAuthEchoRequest(method=GET,
 
url=settings.TWITTER_VERIFY_CREDENTIALS,
 #parameters=params
 )
 
  
  signature=oauth_echo_request.sign_request(oauth.SignatureMethod_HMAC_SHA1()
 ,
   consumer,
   token)
 
   headers = oauth_echo_request.to_header()
   headers['X-Auth-Service-Provider'] =
   settings.TWITTER_VERIFY_CREDENTIALS
 
   #with multipart_encode
   values = [
   MultipartParam('key',value=settings.TWITPIC_API_KEY),
 
MultipartParam('message',value=form.cleaned_data['message']),
   MultipartParam('media',
  filename='copine_moi.jpg',
  filetype='image/jpeg',
 
   fileobj=open(/home/yml/Desktop/copine_moi.jpg,rb))
   ]
 
   register_openers()
   datagen, heads = multipart_encode(values)
   headers.update(heads)
   req = urllib2.Request(settings.TWITPIC_API_URL, datagen,
   headers)
   # Post to netcat
   #req = urllib2.Request(http://127.0.0.1:9000;, datagen,
   headers)
 
   #with urlencode
   #values = {}
   #values['key'] = MultipartParam(settings.TWITPIC_API_KEY)
   #values['message'] =
   MultipartParam(form.cleaned_data['message'])
   #values['media'] =
 open(/home/yml/Desktop/copine_moi.jpg,
   rb).read()
   #data = urllib.urlencode(values)
   #req = 

Re: [twitter-dev] Profile Image

2010-06-04 Thread Lil Peck
On Fri, Jun 4, 2010 at 2:52 AM, Erphan Rajput irf...@gmail.com wrote:
 Hi,

 Do I have to make a HTTP Request with OAuth Tokens to get Bigger
 Profile Image.



Nope, you don't:

On Sun, Apr 18, 2010 at 3:37 PM, Raffi Krikorian ra...@twitter.com wrote:
 http://api.twitter.com/1/users/profile_image/raffi?size=bigger
 we will document this endpoint this week.


More info:
http://classicaspreference.com/aspexamples/PHP_for_twitter_json_get_profiles.asp

and  
http://stackoverflow.com/questions/2115084/pull-twitter-profile-image/2115205

Cheers, Lil


[twitter-dev] Problem with adding favorites (api.twitter.com/1)

2010-06-04 Thread Sam Street
Im having difficulties adding favorites to Twitter.

I am using the following URL:

http://api.twitter.com/1/favorites/15256536658/create.xml

http://api.twitter.com/1/favorites/15256536658/create.json

Neither seem to work via my OAuth App. I get the following response:

string(70) {request:/1/favorites/15256536658/
create.json,error:Not found}


Is this a known bug? Should I be using http://twitter.com instead of
api.twitter.com/1 ?

-Sam


Re: [twitter-dev] Problem with adding favorites (api.twitter.com/1)

2010-06-04 Thread Taylor Singletary
We might have a documentation bug here that we'll get fixed soon.

Try:

http://api.twitter.com/1/favorites/create/15256536658.xml or .json

Taylor Singletary
Developer Advocate, Twitter
http://twitter.com/episod


On Fri, Jun 4, 2010 at 9:01 AM, Sam Street sam...@gmail.com wrote:

 Im having difficulties adding favorites to Twitter.

 I am using the following URL:

 http://api.twitter.com/1/favorites/15256536658/create.xml

 http://api.twitter.com/1/favorites/15256536658/create.json

 Neither seem to work via my OAuth App. I get the following response:

 string(70) {request:/1/favorites/15256536658/
 create.json,error:Not found}


 Is this a known bug? Should I be using http://twitter.com instead of
 api.twitter.com/1 ?

 -Sam



Re: [twitter-dev] Window.open twitter.com doesnt work inIE6

2010-06-04 Thread John Adams
There is a fair amount of framebusting code and anti-XSRF/CSRF code designed
to stop Twitter from being opened in a popup window or IFRAME.

That might be what's blocking such requests.

-j


On Fri, Jun 4, 2010 at 12:11 AM, tweetphp zubi...@gmail.com wrote:

 THis simple javascript code does not work in IE6 :window.open('http://
 twitter.com', '', 'resizable,scrollbars')
 Can anybody help?



[twitter-dev] Saerch API and Twitter Live Search Results disparity

2010-06-04 Thread Brian Maso
Last night I collected tweets through the search API for the hashtag
#glossgreen, and got a sizeable number of tweets.

This morning I did the equivalent thing through the search box on my
Twitter homepage (the URL that appears in my browser is http://
twitter.com/#search?q=%23glossgreen), and got different results.

More specifically, I found that there were a few users who's tweets
appeared when doing the search through the search box in the browser
who do not appear at all through the search API results. For example,
the user @gloss had many tweets using the #glossgreen hashtag in the
time period around 6-8 pm PDT 6/2 -- none of these appear in the
twitter search results, but many appear in results through the twitter
search box on my personal twitter homepage.

I just re-performed both searches this morning to make sure this isn't
a temporary issue, but got the same disparity,

What expectation should I have about search API accuracy? Shold I
expect the search API results to eventually repair, or is are the
@gloss tweets permanently missing from the search API's database?

I don't want to have to use multiple different APIs/screen-scrapes/
streams just to make sure I get accurate search results, but if that's
what I have to do then please let me know.

Brian Maso


[twitter-dev] @anywhere fails if ShareThis on the page?

2010-06-04 Thread LeeS - @semel
I get this Javascript error when trying to use @anywhere on the same
page as a ShareThis widget.

Error: Permission denied for [name of my site[ to get property
Window.document from http://wd.sharethis.com.
Source File: http://platform.twitter.com/anywhere.js?id=[my api
key]v=1
Line: 1


[twitter-dev] Getting errors from Twitter, Open Auth

2010-06-04 Thread Michael Cameron
I have a Javascript that builds my twitter request to Twitter. i am
using Crypto's Hmac(SHA-1) to encrypt my signaturebase string  key
the escape, and replace all function are used to convert to URL
encoded (replaceall takes care of the + and / that doesn't get encoded
with escape)

Is there anything that i am doing wrong when i have my parameters or
the request?

var Parameters =
[oauth_consumerkey=+sConsumerToken,oauth_nonce=+nounce,oauth_signature_method=HMAC-
SHA1,oauth_timestamp=+epoch,oauth_token=+sAccessToken,oauth_version=1.0,text=+sText,user=+sUser];
var SortedParameters = Parameters.sort();
var joinParameters = SortedParameters.join();
var encodeParameters = escape(joinParameters);
encodeParameters=replaceAll(encodeParameters, [[+,%2B],
[/,%2F]]);

var encodebasestring = POST+escape(NormalizedURL)
++escape(encodeParameters);

encodebasestring=replaceAll(encodebasestring, [[+,%2B],
[/,%2F]]);
signature_base_string = encodebasestring;



signature_key = sConsumerSecret++sAccessSecret;

signature =
Base64.encode(hmacsha1(signature_base_string,signature_key));
sAuthHeader = OAuth realm='',oauth_nonce=+nounce
+,oauth_timestamp=+epoch+,oauth_consumer_key=+sConsumerToken
+,oauth_signature_method=HMAC-
SHA1,oauth_version=1.0,oauth_signature=+signature
+,oauth_token=+sAccessToken+,text=+sText;
goNVOut.Set(Header.Authorization:, sAuthHeader);


[twitter-dev] Re: Getting errors from Twitter, Open Auth

2010-06-04 Thread Michael Cameron
I can also send data to whoever is helping, example
signature_base_string, my result of the base64(hmac-1(message,key)) my
url encoded parameters. I am starting on a test account first and dont
care about the access token/secret stuff as this account will be
removed once i have this figured out and use a production account.

I have retrieved my access token and secret via jtwitter but using my
own Javascript in conjunction with C++ to pull my request, it does get
sent to twitter just with the following result, i have so far recieved
these errors after tweaking, the header.authorization and encoding
methods for parameters.
errorCould not authenticate you./error
errorIncorrect signature/error
errorInvalid / expired Token/error (latest error)

Thank you in advance!!


[twitter-dev] Re: Getting errors from Twitter, Open Auth

2010-06-04 Thread Michael Cameron
I have added the info to a Paste Site to make it look cleaner and help
things be easier, the bottom of the page has my results, and token
info

http://paste2.org/p/864634




Re: [twitter-dev] Re: Getting errors from Twitter, Open Auth

2010-06-04 Thread Taylor Singletary
Debugging OAuth in Javascript is a very painstaking process. What kind of
application are you writing? How is Javascript used to perform the OAuth
requests? Is the Javascript running in a protected environment where the
consumer secret and access token secrets will not be human readable?

Taylor Singletary
Developer Advocate, Twitter
http://twitter.com/episod


On Fri, Jun 4, 2010 at 11:06 AM, Michael Cameron darx...@gmail.com wrote:

 I have added the info to a Paste Site to make it look cleaner and help
 things be easier, the bottom of the page has my results, and token
 info

 http://paste2.org/p/864634





[twitter-dev] Is tweet retweeted or not.

2010-06-04 Thread omergul123
Hello. In my application I get the user's home timeline. I let the
user to natively (by using the retweet feature of Twitter in the API)
retweet a tweet. If the user reloads the page I get the updated home
timeline from the twitter servers again. However there isn't any tag
in the status tag indicating that the user has already retweeted this
so that I can show a mark to the user that he already retweeted the
particular tweet. Is there any way for this?


[twitter-dev] Re: Getting errors from Twitter, Open Auth

2010-06-04 Thread Michael Cameron
The Javascript is only a part of the application, the application is
actually just a service that sends a message to users from an account.
the application is built in C++. and we pull our tokens from the
database. The javascript builds the request and then gets sent off
through C++.  the web requests in general work. i have been able to
send SOAP requests, and i was able to send the requests for basic,
this is more of an upgrade job.

for instance the previous script for authorization was:
var sUser = ;
var sPassword = ;
var sLogin64 = ;
var sAuthHeader = ;




sUser = nvGet(username);
sPassword = nvGet(password);


goNVOut.Duplicate(goNVIn);

goNVIn.Destroy(username);
goNVIn.Destroy(password);

sUser += :;
sUser += sPassword;

sLogin64 = Base64.encode(sUser);
sAuthHeader = Basic  + sLogin64;

goNVOut.Set(Header.Authorization, sAuthHeader);

On Jun 4, 12:15 pm, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Debugging OAuth in Javascript is a very painstaking process. What kind of
 application are you writing? How is Javascript used to perform the OAuth
 requests? Is the Javascript running in a protected environment where the
 consumer secret and access token secrets will not be human readable?

 Taylor Singletary
 Developer Advocate, Twitterhttp://twitter.com/episod

 On Fri, Jun 4, 2010 at 11:06 AM, Michael Cameron darx...@gmail.com wrote:
  I have added the info to a Paste Site to make it look cleaner and help
  things be easier, the bottom of the page has my results, and token
  info

 http://paste2.org/p/864634


[twitter-dev] Re: OAuth Echo problem in python

2010-06-04 Thread yml
At that point both services yfrog and twipic work fine. I hate to say
this but I am almost convince that the pain in the development process
comes from some outage in either twitpic or Twitter Oauth Echo
authentication.

for the sake of completeness of this thread here it is my 2 working
views : http://dpaste.com/203292/

Regards,
--yml

On Jun 4, 9:59 am, Yann Malet yann.ma...@gmail.com wrote:
 I have just uploaded the same image using the web interface 
 :http://twitpic.com/1ttrlu
 http://twitpic.com/1ttrludo you have any recommendation ? On how to solve
 this issue.
  http://twitpic.com/1ttrluRegards,
 --yml

 On Fri, Jun 4, 2010 at 9:56 AM, Yann Malet yann.ma...@gmail.com wrote:
  Steve,
  The image is only 33.7kb and it is  a jpg.
  Do you have any python sample code for the ?
  Regards,
  --yml

  On Fri, Jun 4, 2010 at 9:38 AM, Steve C st...@twitpic.com wrote:

  Twitpic will only 400 Bad Request you if it can't find the image in
  your multipart/form-
  data or if the image is invalid (not jpg/png/gif or 5MB in size).

  Thanks,

  Steve C
  Twitpic

  On Jun 4, 9:20 am, Yann Malet yann.ma...@gmail.com wrote:
   If I send this request to 127.0.0.1:9000 without the file here it is
  the
   string I can observe :

   
   (ve)y...@yml-laptop:jess3$ netcat -l -p 9000
   POST / HTTP/1.1
   Accept-Encoding: identity
   Content-Length: 377
   X-Auth-Service-Provider:
 https://api.twitter.com/1/account/verify_credentials.json
   Host: 127.0.0.1:9000
   User-Agent: Python-urllib/2.6
   Connection: close
   Content-Type: multipart/form-data;
  boundary=a45bd25da2844dac81003987b3c19e18
   X-Verify-Credentials-Authorization: OAuth realm=
 http://api.twitter.com/;,
   oauth_signature_method=HMAC-SHA1,
   oauth_consumer_key=y2hEqGNEmyjU2De3hNcg,
   oauth_token=90476798-5VZeNLpXUCaJ06UaWve2c4JVfdcJj5D4r21JxUFM,
   oauth_signature=NMPlU4cRYl0b6jbQJ1xGXaZ5%2FpM%3D

   --a45bd25da2844dac81003987b3c19e18
   Content-Disposition: form-data; name=key
   Content-Type: text/plain; charset=utf-8
   Content-Length: 32

   4bb040d1ec65427f8038cdd60a12cde2
   --a45bd25da2844dac81003987b3c19e18
   Content-Disposition: form-data; name=message
   Content-Type: text/plain; charset=utf-8
   Content-Length: 13

   copine et moi
   --a45bd25da2844dac81003987b3c19e18--
   ^C
   (ve)y...@yml-laptop:jess3$

   

   Does any one can spot the issue ?
   Regards,
   --yml

   On Fri, Jun 4, 2010 at 9:14 AM, Yann Malet yann.ma...@gmail.com
  wrote:
Hello Zac,

I rewrote everything in my app based on python-oauth2 :
   http://dpaste.com/203168/
The file is still hardcoded to ease the comprehension. I hope this
  will
help you to spot my issue.

The error message I get from twitpic is 400 bad request.
Regards,
--yml


class OAuthEchoRequest(oauth.Request):
     def to_header(self, realm='http://api.twitter.com/'):
        headers = super(OAuthEchoRequest, self).to_header(realm=realm)
        return {'X-Verify-Credentials-Authorization':
headers['Authorization']}

@login_required
def twitpic_upload_photo(request):
    if request.method == 'POST':
        form = PhotoForm(request.POST, request.FILES)
        if form.is_valid():
            profile = Profile.objects.get(user=request.user)
            token = oauth.Token(profile.oauth_token,
                               profile.oauth_secret)

            params = {
                'oauth_consumer_key': settings.TWITTER_CONSUMER_KEY,
                'oauth_signature_method':HMAC-SHA1,
                'oauth_token':token.key,
                 'oauth_timestamp':oauth.generate_timestamp(),
                'oauth_nonce':oauth.generate_nonce(),
                'oauth_version':'1.0'
            }

            oauth_echo_request = OAuthEchoRequest(method=GET,

 url=settings.TWITTER_VERIFY_CREDENTIALS,
                                          #parameters=params
                                          )

   signature=oauth_echo_request.sign_request(oauth.SignatureMethod_HMAC_SHA1()
  ,
consumer,
                                    token)

            headers = oauth_echo_request.to_header()
            headers['X-Auth-Service-Provider'] =
settings.TWITTER_VERIFY_CREDENTIALS

            #with multipart_encode
            values = [
                MultipartParam('key',value=settings.TWITPIC_API_KEY),

 MultipartParam('message',value=form.cleaned_data['message']),
                MultipartParam('media',
                               filename='copine_moi.jpg',
                               filetype='image/jpeg',

fileobj=open(/home/yml/Desktop/copine_moi.jpg,rb))
            ]

            register_openers()
            datagen, heads = multipart_encode(values)
            headers.update(heads)
            req = urllib2.Request(settings.TWITPIC_API_URL, datagen,
headers)
            # Post 

[twitter-dev] Re: Important Notice on Incorrect API Endpoints for Search, REST, OAuth (+ some general tips!)

2010-06-04 Thread Guillermo
I'm also having issues on not receiving new tweets when I use the
since_id value. Pretty much the same problem described in the above
comments.


Re: [twitter-dev] Saerch API and Twitter Live Search Results disparity

2010-06-04 Thread Jonathan Reichhold
This is actually an artifact of how retweets are displayed between
search.twitter.com and twitter.com  The tweets are there, but the display is
different.

Jonathan

On Fri, Jun 4, 2010 at 10:10 AM, Brian Maso br...@blumenfeld-maso.comwrote:

 Last night I collected tweets through the search API for the hashtag
 #glossgreen, and got a sizeable number of tweets.

 This morning I did the equivalent thing through the search box on my
 Twitter homepage (the URL that appears in my browser is http://
 twitter.com/#search?q=%23glossgreen), and got different results.

 More specifically, I found that there were a few users who's tweets
 appeared when doing the search through the search box in the browser
 who do not appear at all through the search API results. For example,
 the user @gloss had many tweets using the #glossgreen hashtag in the
 time period around 6-8 pm PDT 6/2 -- none of these appear in the
 twitter search results, but many appear in results through the twitter
 search box on my personal twitter homepage.

 I just re-performed both searches this morning to make sure this isn't
 a temporary issue, but got the same disparity,

 What expectation should I have about search API accuracy? Shold I
 expect the search API results to eventually repair, or is are the
 @gloss tweets permanently missing from the search API's database?

 I don't want to have to use multiple different APIs/screen-scrapes/
 streams just to make sure I get accurate search results, but if that's
 what I have to do then please let me know.

 Brian Maso


[twitter-dev] Re: Saerch API and Twitter Live Search Results disparity

2010-06-04 Thread Bess
This is related to cache. Search API results are from cache to improve
performance? Search API is not getting the same results as Stream API?

On Jun 4, 3:12 pm, Jonathan Reichhold jonathan.reichh...@gmail.com
wrote:
 This is actually an artifact of how retweets are displayed between
 search.twitter.com and twitter.com  The tweets are there, but the display is
 different.

 Jonathan

 On Fri, Jun 4, 2010 at 10:10 AM, Brian Maso br...@blumenfeld-maso.comwrote:

  Last night I collected tweets through the search API for the hashtag
  #glossgreen, and got a sizeable number of tweets.

  This morning I did the equivalent thing through the search box on my
  Twitter homepage (the URL that appears in my browser is http://
  twitter.com/#search?q=%23glossgreen), and got different results.

  More specifically, I found that there were a few users who's tweets
  appeared when doing the search through the search box in the browser
  who do not appear at all through the search API results. For example,
  the user @gloss had many tweets using the #glossgreen hashtag in the
  time period around 6-8 pm PDT 6/2 -- none of these appear in the
  twitter search results, but many appear in results through the twitter
  search box on my personal twitter homepage.

  I just re-performed both searches this morning to make sure this isn't
  a temporary issue, but got the same disparity,

  What expectation should I have about search API accuracy? Shold I
  expect the search API results to eventually repair, or is are the
  @gloss tweets permanently missing from the search API's database?

  I don't want to have to use multiple different APIs/screen-scrapes/
  streams just to make sure I get accurate search results, but if that's
  what I have to do then please let me know.

  Brian Maso


Re: [twitter-dev] Re: Saerch API and Twitter Live Search Results disparity

2010-06-04 Thread Jonathan Reichhold
This has nothing to do with the cache.  Speaking as a engineer in the search
group I can state that this has nothing to do with the cache.

Jonathan
@jreichhold

On Fri, Jun 4, 2010 at 9:12 PM, Bess bess...@gmail.com wrote:

 This is related to cache. Search API results are from cache to improve
 performance? Search API is not getting the same results as Stream API?

 On Jun 4, 3:12 pm, Jonathan Reichhold jonathan.reichh...@gmail.com
 wrote:
  This is actually an artifact of how retweets are displayed between
  search.twitter.com and twitter.com  The tweets are there, but the
 display is
  different.
 
  Jonathan
 
  On Fri, Jun 4, 2010 at 10:10 AM, Brian Maso br...@blumenfeld-maso.com
 wrote:
 
   Last night I collected tweets through the search API for the hashtag
   #glossgreen, and got a sizeable number of tweets.
 
   This morning I did the equivalent thing through the search box on my
   Twitter homepage (the URL that appears in my browser is http://
   twitter.com/#search?q=%23glossgreen), and got different results.
 
   More specifically, I found that there were a few users who's tweets
   appeared when doing the search through the search box in the browser
   who do not appear at all through the search API results. For example,
   the user @gloss had many tweets using the #glossgreen hashtag in the
   time period around 6-8 pm PDT 6/2 -- none of these appear in the
   twitter search results, but many appear in results through the twitter
   search box on my personal twitter homepage.
 
   I just re-performed both searches this morning to make sure this isn't
   a temporary issue, but got the same disparity,
 
   What expectation should I have about search API accuracy? Shold I
   expect the search API results to eventually repair, or is are the
   @gloss tweets permanently missing from the search API's database?
 
   I don't want to have to use multiple different APIs/screen-scrapes/
   streams just to make sure I get accurate search results, but if that's
   what I have to do then please let me know.
 
   Brian Maso



Re: [twitter-dev] Re: Saerch API and Twitter Live Search Results disparity

2010-06-04 Thread Jonathan Reichhold
The stream API will have more results and will give all results versus the
search API which will sample popular results (high-velocity), but for this
case all results are available for both systems.

Jonathan

On Fri, Jun 4, 2010 at 9:12 PM, Bess bess...@gmail.com wrote:

 This is related to cache. Search API results are from cache to improve
 performance? Search API is not getting the same results as Stream API?

 On Jun 4, 3:12 pm, Jonathan Reichhold jonathan.reichh...@gmail.com
 wrote:
  This is actually an artifact of how retweets are displayed between
  search.twitter.com and twitter.com  The tweets are there, but the
 display is
  different.
 
  Jonathan
 
  On Fri, Jun 4, 2010 at 10:10 AM, Brian Maso br...@blumenfeld-maso.com
 wrote:
 
   Last night I collected tweets through the search API for the hashtag
   #glossgreen, and got a sizeable number of tweets.
 
   This morning I did the equivalent thing through the search box on my
   Twitter homepage (the URL that appears in my browser is http://
   twitter.com/#search?q=%23glossgreen), and got different results.
 
   More specifically, I found that there were a few users who's tweets
   appeared when doing the search through the search box in the browser
   who do not appear at all through the search API results. For example,
   the user @gloss had many tweets using the #glossgreen hashtag in the
   time period around 6-8 pm PDT 6/2 -- none of these appear in the
   twitter search results, but many appear in results through the twitter
   search box on my personal twitter homepage.
 
   I just re-performed both searches this morning to make sure this isn't
   a temporary issue, but got the same disparity,
 
   What expectation should I have about search API accuracy? Shold I
   expect the search API results to eventually repair, or is are the
   @gloss tweets permanently missing from the search API's database?
 
   I don't want to have to use multiple different APIs/screen-scrapes/
   streams just to make sure I get accurate search results, but if that's
   what I have to do then please let me know.
 
   Brian Maso