[twitter-dev] Re: The best method for finding new retweets

2010-12-08 Thread fbparis
I've worked on this and havn't found any clean solutions.. Checking
all new retweets would consume too much requests :(

Note that if statuses/mentions method was running as expected (http://
dev.twitter.com/doc/get/statuses/mentions) with the include_rts
parameter, we wouldnt have any problem with that... (but actually
retweets are not showed even with the include_rts set to true).

On Oct 29, 11:22 pm, Tobias C. Jensen 2bia...@gmail.com wrote:
 Hi guys.

 I just tried showing my retweets using retweets_of_me.

 However, if I get someone to retweet one of my already retweeted
 statuses, nothing changes in the result - because it already figures
 as retweeted, and retweets_count always shows 'false'.

 So does this mean I have to look them all through and find their
 individual retweets, everytime I want to find out if I've got new
 ones? Or is there another method I can use?

 All I want to do is monitor new retweets.

 Thanks in advance!

 - Tobias

-- 
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: language and geocode problem

2010-11-30 Thread fbparis
They're working on a fix. That's all. People always asking timeframe
to coders make me mad.. If your car refuses to start and you have no
idea why, and someone bugging you every 2 minutes : how long before it
works ? What would you say..

On Nov 30, 5:47 pm, Colin Surprenant colin.surpren...@gmail.com
wrote:
 Currently it looks like any geo based search queries are returning
 zero result.
 ex, on New 
 York:http://search.twitter.com/search.json?geocode=40.739454,-73.883743,75km

 The question is: what is the expected timeframe for a fix on this?
 hours, days, weeks?
 They only say Engineering working on a fix. See

 https://twitter.com/#!/twitterapi/status/9262744515645440http://twitter.com/#!/twitterapi/status/9636345710379008

 Colin

 On Nov 30, 8:27 am, mazz sen...@gmail.com wrote:







  Hi,
  has somebody noticed that there are problems filtering the search with
  language and geocode?

  This search gives only few tweets or 
  nothing:http://search.twitter.com/search.atom?lang=enq=me

  and with italian ther's no way to get 
  results:http://search.twitter.com/search.atom?lang=itq=calcio

  thanks
  Mazz

-- 
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: Search API Optional lang Has Problem.

2010-11-29 Thread fbparis
Same here.

On Nov 29, 1:50 am, Jeong Hoon Kim redi...@gmail.com wrote:
 About 5 days ago, Suddenly Search API Optional lang had no results..My
 optional lang is ko.
 Did anybody apply Search API lang option? Did the results come out
 correctly?

-- 
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: Search API Optional lang Has Problem.

2010-11-29 Thread fbparis
And same with some search operators (like source:xxx)

Sorry for posting twice :)

On Nov 29, 1:50 am, Jeong Hoon Kim redi...@gmail.com wrote:
 About 5 days ago, Suddenly Search API Optional lang had no results..My
 optional lang is ko.
 Did anybody apply Search API lang option? Did the results come out
 correctly?

-- 
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: Getting tweets from users following a particular user

2010-11-29 Thread fbparis
Simply create an account to follow them :) Or make a list...

On Nov 30, 1:51 am, Louis louis...@gmail.com wrote:
 I was under the impression that using 'follow' simply returns tweets
 or retweets which were originally created by, or were in reply to, a
 specific user - I'm interested in getting *any* tweet from all users
 following this special user (sampled possibly).

 For example, I could use it to see what people who follow @Microsoft
 talk about, Microsoft related or not.

 On Nov 29, 9:12 pm, M. Edward (Ed) Borasky zn...@borasky-







 research.net wrote:
  Quoting Louis louis...@gmail.com:

   I'd like to stream tweets from the set of users which follow a
   specific user. Is there a way to do this directly, or a way to get a
   list of such users, so I can then specify to filter tweets from them
   only?

  It depends on how many followers the user has. Up to 5000, you can do  
  it with the follow parameter either on the filter Streaming  
  endpoint or on User Streams. Over 5000, you will need to get elevated  
  access via Gnip.

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

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

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


[twitter-dev] Re: Best scalable method to process mentions

2010-11-29 Thread fbparis
I guess you should use the stream api to get mentions in real time. No
need to process it directly, you could code a simple client connected
to the stream api which record new mention in database, then launch
your script time to time and get the mentions via the database rather
than via the twitter api.

On Nov 30, 1:25 am, Serdar ser...@guzelanket.com wrote:
 Hi I have just launched my first twitter application. Basically:

 -People send a tweet that mentions @appName (authorizing not needed)
 -App checks for new @appName mentions *from time to time*, and process
 them.

 There is a max mentions limit (200) that can be retrieved at a time
 via API. I know I'm not hitting this limit soon with the app but I
 want to code a scalable method fo get mentions.

 Unfortunaltely we do not have the option to get mentions in the
 'oldest first' order.

 This causes a little tricky code for getting mentions in chunks and
 not missing older tweets. (Suppose you had 200+ mentions since last
 check).

 For testing I limit, 'max mentions to get at a time' to 10, in my code
 and it seems to be working.

 I won't go into more details...

 -I would like to know if any of you have coded something similar?

 -Would love to see an alternative, as I'm not happy with my code!

 -Is there an API method I could use for this purpose, which would make
 things easier?

 Thanks,
 Serdar.

-- 
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] twt.tl and t.co and the security

2010-06-10 Thread fbparis
This new feature can be great, especialy if you provide some free
analytics about clicks, retweets count in the way bit.ly does
(R.I.P. :D).

But you said : we're trying to protect users against phishing and
other malicious attacks

I'm wondering how you can do that : expand all urls and follow http
redirections ? What if attackers are using meta redirectors, or
javascript redirectors, or flash redirectors ? :)

I wish you good luck !


[twitter-dev] Re: Error using the search API

2009-12-18 Thread fbparis
First you should read this : http://apiwiki.twitter.com/Rate-limiting

On Dec 18, 8:19 pm, sitting tiger huayin.w...@gmail.com wrote:
 Hi,
 I am getting error like this while testing my app using Twitter Search
 API:
 {'error': 'You have been rate limited. Enhance your calm.'}

 I do not think that I am reaching the 2 limit.
 What should I do/check?
 Thanks in advance.


[twitter-dev] lang parameter in the search api

2009-10-23 Thread fbparis

The language filter in the search api doesnt seem very accurate.

I've noticed that using Google Translate API for lang detection allow
to refine results very well. So I suggest, if Twitter makes a deal
with google, try to get their lang detection system :) It could be
great for stream api too...


[twitter-dev] Re: about OAuth

2009-10-11 Thread fbparis

Yes you can..

On 10 oct, 20:05, Oguzhan asp...@gmail.com wrote:
 Hi Folks,

 I'm using OAuth in my twitter application and I was wondering
 something.

 Have received the user's permission by OAuth.
 I saved my database oauth_token after for example one day later. Can I
 update twitter status with my saved oauth_token?


[twitter-dev] Re: Followers/screen_names API

2009-09-05 Thread fbparis

I think changeable screen_names are a big problem even outside the
api, for links for example : twitter accounts are linked everywhere
with uri http://twitter.com/screen_name so it may cause 404 if the
user changes his/her screen_name, or worst if someone else takes it,
it will link to the wrong place ! Such links should be very low valued
by search engines. This is even not what it's called Unique Ressource
Identifier...

On Sep 5, 7:30 pm, owkaye owk...@gmail.com wrote:
 You've just made a perfect argument for my suggestion that
 Twitter use ONLY unchangeable screen names (no more ids) for
 the whole system.

 :)

 Owkaye



  I know there's been a ton of request for a
  followers/screen_names API, or a friends/screen_names one
  for that matter. Right now the only way of getting all of
  a user's followers is with
 http://twitter.com/followers/ids.xmland that only
  renders the id's. There's no efficient way of getting the
  associated screen_names without doing
  hundreds/thousands/millions of calls or running into API
  rate limits. Twitter has rejected the creation of a
  followers/screen_names API due to performance issues/
  concerns. What if I or you want to present our app users
  with a human readable list of their followers/friends. I
  believe the alternative is a much more performance heavy
  approach for Twitter. What's to stop me from creating a
  1000 (or more) unique users that my app/service uses to
  resolve id's into screen_names? That way I would have
  hundreds of thousands of API calls available each hour
  and could easily create a locally cached db of
  id-to-screen_name pairs. And of course I would have to
  recheck all of them every few days or so to account for
  screen_name changes, since there isn't an API for that
  either. All of this would result in millions of API calls
  a day, just to do something that Twitter could enable
  with one simple API... Hell, I could register a hundred
  thousand users, and create a service that maintains an
  id-to-screen_name pair db for Twitter's entire userbase
  and make it available to the dev community as a service
  to work around this issue... What do you think? Wouldn't
  it be much easier and beneficial to Twitter to enable
  this simple API that many of us have been asking for for
  so long now?

  I look forward to you thoughts...

  Michael


[twitter-dev] Allowing password update or stopping allowing email update via api

2009-09-04 Thread fbparis

I was wondering why we can not set user password via the user_update
method. Email can be updated this way, and a bad app could then use
the http://twitter.com/account/resend_password form to steal some
twitter accounts.

Maybe the user_update method shouldnt be able to update email. Or
maybe creating a third access level would be an option (read, read /
write, update email or password)..


[twitter-dev] Re: Counter for rate limit remaining requests unreliable, often reaches 0 unduly

2009-09-04 Thread fbparis

According to the last api request you've done, X-RateLimit-Remaining
can be user limit or IP limit (depends if you made an authentified
request or not).

This can explain the X-RateLimit-Remaining values you've posted.

On Sep 4, 11:03 am, Reivax xavier.yo...@gmail.com wrote:
 I'm having this problem for a few days, and I've been monitoring ALL
 requests sent to twitter, here is what I saw :
 The value of the X-RateLimit-Remaining header is totally unreliable.
 For instance, the response to a request will have it at 120, while the
 next response will have it at 40.
 Then subsequent request responses will have values such as 118, 39,
 37, 36, 117, ... and so on.

 All responses have the same X-RateLimit-Reset !

 It all looks like there are 2 unsynchronized counters, and responses
 get values from either one of them...

 The trouble is that one counter reaches 0 much too early, which makes
 my twitter client says the maximum allowed request has been reached !!

 I make 3 requests every 2 minutes, so I should never reach the max.

 I have the exact same behavior when using the rate_limit_status
 request.

 I made sure I have no other client on that account, and I can
 reproduce the problem each time. Even if I had, there would not be
 cases where it goes from 36 to 117 for 2 adjacent requests...

 Thanks for looking into that !
 (I can provide traces of the requests)

 Regards,
 Xavier


[twitter-dev] Re: Getting screen_name from id without gazillion API calls?

2009-09-04 Thread fbparis

statuts/friends and status/followers i guess

On Sep 5, 3:01 am, dizid glasw...@gmail.com wrote:
 Hi,

 When i request friends (or followers) from the Twitter API i want to
 get the screen_name's based on the id's.

 I use users/show for this, inputting the id and getting back de
 screen_name.
 This costs ALOT of API calls and i run into the API rate limit fast,
 especially with many friends.

 Is there a better way of getting screen_names for friends / followers?
 ( Better, meaning in fewer API calls.)

 Thank you.


[twitter-dev] An issue with the API Method: favorites and the return value Following

2009-09-01 Thread fbparis

After some tests, it seems the return value for Following after a call
to get favorites of a user is pretty bugged.

For example in the same set of results where 2 distincts favorited
statuses are from the same user, the following field can be
different  ! (one time false, one time true).

The only way to be sure the authentified user who does the favorites
query is following or not the writer of the favorited tweet would be
to use another api call and compare id with those returned by the
friends/id method ? That would be boring :(


[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread fbparis

I've just coded this function which may help :

function redirect_post($url,$data) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_HEADER, true);

curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

list($header,$content) = preg_split(#(\r)?\n(\r)?\n#s,curl_exec
($ch),2);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);

curl_close($ch);

if (in_array($http_code,array(301,302))) {
$redir = preg_match(#Location:(.*?)\n#si,$header,$m) ? trim($m
[1]) : '';
if ($redir  ($redir != $url)) return 
redirect_post($redir,$data);
}

return $content;
}

I've tested, it's ok ; and shouldn't be so hard to use in the lib.

I'll have to use the Jaisen Mathai OAuth library very soon too, so if
no solution has been found I'll post mine here :)

FB