[twitter-dev] Re: A new permission level

2011-05-18 Thread mostafa farghaly
Please exclude xAuth mobile clients from this, logically and from the 
usability point of view, it doesn't make any sense, the user authorize my 
app to use his account, why i ask for his authorization again to view his 
Direct messages, why you insist on making our life very hard :(


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


[twitter-dev] Re: How to detect a gap in timeline ?

2011-04-14 Thread mostafa farghaly
anybody ?

-- 
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] How to detect a gap in timeline ?

2011-04-13 Thread mostafa farghaly
Most iPhone apps have the feature to detect gaps in timeline ? how can
i know that there's a gap between to tweets ???

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-dev] cancel follow request

2010-11-29 Thread mostafa farghaly
Hi,

Canceling outgoing follow request works fine on twitter.com by:
http://api.twitter.com/1/friendships/cancel.json

but calling it from the API return:
The server understood the request, but is refusing to fulfill it.

could you please allow us to cancel outgoing follow request from the
API.

-- 
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: media types in the tweet

2010-10-24 Thread mostafa farghaly
what confuses me is that twitter for example send request to get the
next page of home timeline, and get normal response [{},{},...]
contain no info at all -even in entities- about the media types, but
rendering the tweets indicate media types as i mentioned before with
icons, trying to read twitter front-end JavaScript files and
understand how they do it ...

On Oct 24, 10:09 am, Jaanus  wrote:
> It would be awesome if entities or annotations contained this info.
> Right now it doesn't seem to be available.
>
> J
>
> On Oct 23, 3:58 pm, mostafa farghaly  wrote:
>
> > on twitter.com if the tweet contain image, video ...etc : the tweet
> > will have image & video icons even if the links to this media is
> > short ... is there a better way for knowing the media types in the
> > tweets from the API than analyzing the long urls ?

-- 
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] media types in the tweet

2010-10-23 Thread mostafa farghaly
on twitter.com if the tweet contain image, video ...etc : the tweet
will have image & video icons even if the links to this media is
short ... is there a better way for knowing the media types in the
tweets from the API than analyzing the long urls ?

-- 
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: XAuth 401 error

2010-09-01 Thread mostafa farghaly
i'm on my way to fix this, but i wonder why you didn't let us know
about this change ???

On Sep 1, 8:44 pm, Steve Loft  wrote:
> Thanks - the problem was that the library routine I used for the Unix
> timestamp didn't take Daylight Savings into account!
>
> Steve
>
> On Sep 1, 5:35 pm, Taylor Singletary 
> wrote:
>
> > We have fixed a bug in our OAuth implementation that allowed timestamps in
> > the future to be accepted. We've now corrected this such that timetsamps
> > must be within a reasonable amount of time in cosideration to Twitter's
> > server clocks.
>
> > We return our current time in the "Date" HTTP header of every
> > response. One easy way to fixate an application's clock with our servers is
> > to issue a HTTP HEAD request tohttp://api.twitter.com/1/help/test.xml--
> > it's a non-rate-limited request and will allow you to adjust your clock in
> > relation to ours.
>
> > Make sure that you're keeping to the OAuth spec and using UTC-based epoch
> > time in seconds.
>
> > Taylor
>
> > On Wed, Sep 1, 2010 at 9:15 AM, Steve Loft 
> > wrote:
>
> > > Users of my xAuth application are also getting 401, since about 12
> > > hours ago.
>
> > > Steve
>
> > > --
> > > 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?hl=en

-- 
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?hl=en


[twitter-dev] Re: all my client users report failed to validate oauth signature ...

2010-09-01 Thread mostafa farghaly
thank you i find this after writing the post
http://groups.google.com/group/twitter-development-talk/browse_thread/thread/64e59e18c4948fa


On Sep 1, 8:18 pm, Taylor Singletary 
wrote:
> We did make a change last night that enforced that oauth_timestamps could
> not be in the future (previously we only validated that they weren't in the
> past).
>
> Ensure that your oauth_timestamp is always within 5 minutes of
> api.twitter.com, regardless of the time within the system environment you're
> executing requests.
>
> Taylor
>
> On Wed, Sep 1, 2010 at 10:03 AM, Dewald Pretorius  wrote:
> > I'm seeing a similar thing. Some of my users who have been OAuth
> > authorized for many weeks now suddenly get an invalid OAuth signature.
>
> > On Sep 1, 1:59 pm, mostafa farghaly  wrote:
> > > Hi,
> > > i switched to oauth since 2 weeks or so, and deprecated basic auth
> > > completely, and all my client users upgrade, and the app stats show
> > > that every thing is fine and they're enjoying oauth, yesterday i get
> > > the message failed to validate oauth signature , and all my client
> > > users report the same message, i believe that the application my be
> > > black listed because i do alot of requests during my development of
> > > iphone app? plz help.
>
> > --
> > 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?hl=en

-- 
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?hl=en


[twitter-dev] all my client users report failed to validate oauth signature ...

2010-09-01 Thread mostafa farghaly
Hi,
i switched to oauth since 2 weeks or so, and deprecated basic auth
completely, and all my client users upgrade, and the app stats show
that every thing is fine and they're enjoying oauth, yesterday i get
the message failed to validate oauth signature , and all my client
users report the same message, i believe that the application my be
black listed because i do alot of requests during my development of
iphone app? plz help.

-- 
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?hl=en


[twitter-dev] oauth parameters encoding

2010-08-20 Thread mostafa farghaly
how to encode the request parameter in the post body, and in the base
string after getting the access_token and access_token_secret, it will
be very helpful if you give me the mapping from the reserved
characters and their percent encoding as my language encoding
facilities output different results than the twitter oauth guide page.


[twitter-dev] Re: what's wrong with my xAuth code ???

2010-05-12 Thread mostafa farghaly

> What environment are you trying to execute this code in? Javascript in most
> use cases is not an appropriate vehicle for performing OAuth operations --
> unless you "are" the web browser or another kind of application development
> environment in which Javascript is a bit more secure.

I'm using JavaScript in Adobe AIR for desktop application and save the
sensitive data in Encrypted Local store

> That said, I helped a developer through a Javascript OAuth implementation
> last week and after much bashing of the head against the desk, it was found
> that the HMAC_SHA1 algorithm being used was not doing the right thing and
> using the wrong kind of padding.
> Are you able to reproduce the signatures (given exactly the same inputs) as
> detailed onhttp://dev.twitter.com/pages/auth?

Yes, i use the input in the mentioned article and get the same output
using the HMAC_SH1 in my code.



> Have you traced the request to ensure that your authorization header is
> actually being sent properly? How are you avoiding cross-domain issues?

AIR allow cross domain requests, but i didn't trace the request (i'll
trace after replying)


> Taylor Singletary
> Developer Advocate, Twitterhttp://twitter.com/episod
>
> On Thu, May 6, 2010 at 5:13 PM, mostafa farghaly wrote:
>
> > every time i get "failed to validate outh token and signature" :(
> > here's my simple code
>
> >                        var username = "username",
> >                                password = "password",
> >                                url= "
> >https://api.twitter.com/oauth/access_token";,
> >                                key = "key",
> >                                timestamp = +new Date,
> >                                nonce = "thisismynoncce" + timestamp;
>
> >                var access_token = "oauth_consumer_key=" + key +
> >                        "&oauth_nonce=" + nonce +
> >                        "&oauth_signature_method=HMAC_SHA1" +
> >                        "&oauth_timestamp=" + timestamp +
> >                        "&oauth_version=1.0" +
> >                        "&x_auth_mode=client_auth" +
> >                        "&x_auth_password=" + password +
> >                        "&x_auth_username=" + username;
>
> >                        var base_string = "POST&" + encodeURIComponent(url)
> > + "&" +
> > encodeURIComponent(access_token);
>
> >                        var oauth_signature = b64_hmac_sha1("token_secret&",
> > base_string);
>
> >                        var auth_header = 'OAuth oauth_nonce="' + nonce +
> > '"' +
> >                        ', oauth_signature_method="HMAC-SHA1"' +
> >                        ', oauth_timestamp="' + timestamp + '"' +
> >                        ', oauth_consumer_key="' + key + '"' +
> >                        ', oauth_signature="' + oauth_signature + '"' +
> >                        ', oauth_version="1.0"';
>
> >                      $.ajax({
> >                                url:url,
> >                                method: "POST",
> >                                data: {
> >                                        x_auth_username: username,
> >                                        x_auth_password: password,
> >                                        x_auth_mode: "client_auth"
> >                                },
> >                                beforeSend: function(xhr){
>
> >  xhr.setRequestHeader("Authorization", auth_header);
> >                                },
> >                                success: function(data){
> >                                        alert(data);
> >                                },
> >                                error: function(xhr){
> >                                        alert(xhr.responseText);
> >                                }
> >                        })


[twitter-dev] Re: what's wrong with my xAuth code ???

2010-05-08 Thread mostafa farghaly
anybody ???


[twitter-dev] what's wrong with my xAuth code ???

2010-05-06 Thread mostafa farghaly
every time i get "failed to validate outh token and signature" :(
here's my simple code

var username = "username",
password = "password",
url= 
"https://api.twitter.com/oauth/access_token";,
key = "key",
timestamp = +new Date,
nonce = "thisismynoncce" + timestamp;

var access_token = "oauth_consumer_key=" + key +
"&oauth_nonce=" + nonce +
"&oauth_signature_method=HMAC_SHA1" +
"&oauth_timestamp=" + timestamp +
"&oauth_version=1.0" +
"&x_auth_mode=client_auth" +
"&x_auth_password=" + password +
"&x_auth_username=" + username;

var base_string = "POST&" + encodeURIComponent(url) + 
"&" +
encodeURIComponent(access_token);

var oauth_signature = b64_hmac_sha1("token_secret&", 
base_string);


var auth_header = 'OAuth oauth_nonce="' + nonce + '"' +
', oauth_signature_method="HMAC-SHA1"' +
', oauth_timestamp="' + timestamp + '"' +
', oauth_consumer_key="' + key + '"' +
', oauth_signature="' + oauth_signature + '"' +
', oauth_version="1.0"';


  $.ajax({
url:url,
method: "POST",
data: {
x_auth_username: username,
x_auth_password: password,
x_auth_mode: "client_auth"
},
beforeSend: function(xhr){
xhr.setRequestHeader("Authorization", 
auth_header);
},
success: function(data){
alert(data);
},
error: function(xhr){
alert(xhr.responseText);
}
})


[twitter-dev] JavaScript XAuth library ??????

2010-03-26 Thread mostafa farghaly
Hi guys i can't wrap my head around OAuth/XAuth for browserless apps
is there any JavaScript Library for easy working with XAuth 

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


[twitter-dev] Re: ???????

2009-09-13 Thread mostafa farghaly

the first request is figuring out the relation between the users
http://apiwiki.twitter.com/Twitter-REST-API-Method:-friendships-show
and the second request to send the direct message

but it seams the the only solution as Abraham Williams said "If you
don't wan't to make 2 API calls just try sending the DM and if it
fails then you know there is no friendship there. "

but i this irritate me and the user who see "sending message ..." and
then see "Oops you can't send direct msg, may be he don't follow you"


On Sep 13, 6:43 am, JDG  wrote:
> What would that tag do to prevent needing 2 requests?
>
> On Sat, Sep 12, 2009 at 18:07, mostafa farghaly  wrote:
>
> > hi guys
> > i think we need this tag to send direct messages easily,
> > as far as i know i can send direct messages to the buddies i follow
> > and they follow me in the same time , and there's now direct way to
> > know this info from the  info tag, i don't want to make two
> > request: one for making sure they follow each other and one to send
> > the direct message :( .
>
> --
> Internets. Serious business.


[twitter-dev] ???????

2009-09-12 Thread mostafa farghaly

hi guys
i think we need this tag to send direct messages easily,
as far as i know i can send direct messages to the buddies i follow
and they follow me in the same time , and there's now direct way to
know this info from the  info tag, i don't want to make two
request: one for making sure they follow each other and one to send
the direct message :( .