[twitter-dev] API Bug: Malformed JSON returned for some requests

2011-07-05 Thread Idan Gazit
*Full bug report is here: https://gist.github.com/1064338*


Summary:

The Twitter API returns malformed JSON for some valid requests.

I discovered this while attempting to fetch all of my list memberships via 
the API. The issue is present regardless of authentication. It occurs 100% 
of the time, and has persisted for over twelve hours. I have reproduced it 
for multiple users.

Note that the response does not indicate any error condition. The 
transaction completes successfully, but the payload is malformed.

It seems that any user with enough lists will eventually have a page 
returned containing this bug. I've located it on the first two users I 
tried, which is my own account (@idangazit ~120 listed) and that of Jacob 
Kaplan-Moss (@jacobian, ~500 listed), founder of the Django web framework.

The offending queries:

These are two examples:

http://api.twitter.com/1/idangazit/lists/memberships.json?cursor=1336796671888485791

http://api.twitter.com/1/jacobian/lists/memberships.json?cursor=1343747472518328819

Note that these are literally the first two users I inspected. I imagine 
this bug affects anybody with a sufficient number of lists. I have not 
encountered the issue in any other API call, but I haven't looked very hard, 
either.

All of the following applies to my account, but is equally reproducible for 
@jacobian, albeit with different values.

Starting with cursor=-1, the following (stable) progression of next_cursor 
values 
lead to the broken query result:

   - 2nd: 1370876429079454131
   - 3rd: 1363944001883709517
   - 4th: 1352913498669071334
   - 5th: 1336796671888485791

Each of the requests leading up to the offender return well-formed JSON.

The problem is a superfluous empty value at the very end of the lists 
value, more easily seen on line 956 of the pretty-printed JSON attached to 
this gist. Pasting the JSON into a validity checker like http://jsonlint.com 
handily 
points out the invalid serialization.

Interestingly, the developer console in Twitter for Mac munges the response 
to replace the trailing comma with null, thereby making it valid JSON 
(screenshot:http://cl.ly/1q072g380B0P3g213t3e). Regardless, the bytestream 
from the server contains invalid JSON.


Raw and pretty-printed dumps of the transaction are available in the gist 
linked at the top of this post.


Thanks!

Idan (@idangazit)

-- 
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] Changed to authorizeURL; get the proper permission, but now get 401, 401 after one call

2011-07-05 Thread PeriVisioN
Very confused.  I have abrahams API lib, works fine.   After the
change, I updated my apps permission and then changed the following in
his code.

  function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {

if (is_array($token)) {
  $token = $token['oauth_token'];
}
return $this-authorizeURL() . ?oauth_token={$token};
/*
if (empty($sign_in_with_twitter)) {
  echo 'calling authorizeURLbr';
  return $this-authorizeURL() . ?oauth_token={$token};
} else {
  echo 'calling authenticateURLbr'; return;
  return $this-authenticateURL() . ?oauth_token={$token};
}
*/
  }

So I can make 1 call, but after that, its give me a 403
Could not authenticate with OAuth. /1/account/verify_credentials.xml?

Any thoughts

-- 
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] Access level changed to Read, Write AND Direct Message but still can't access DMs!

2011-07-05 Thread alexre...@gmail.com
Most of my apps require read access for Direct Messages, but they're
only reading from one account.  Many users DM to one account and I
need access to that one account to grab all the DMs (which no longer
works as of June 30th).

I changed the Access Level of all my apps to Read, Write and Direct
Message, but it doesn't seem that the change has taken place, or I'm
missing something, somewhere in terms of what I need to do?

When I try and re-authorize an account I see the following on the
Twitter / Authorize screen:

This application will not be able to:
Access your direct messages.
See your Twitter password.

What else do I need to do?  I have confirmed that the application
settings on Twitter do say, Read, Write and Direct Messages for my app
but I can only use my access token (for the Twitter handle
associated with the app) to access direct messages, anytime I try and
re-authorize any account through my actual app, I see:

This application will not be able to:
Access your direct messages.
See your Twitter password.

... which isn't inline with how I setup the settings.  Any help would
be greatly appreciated.  I'm really hoping I'm missing something small
here.

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

2011-07-05 Thread Martijn Coenen
On 4 jul, 20:37, Monojit Das monojitdas1...@gmail.com wrote:
 How will i show my twitter feeds in our website

It depends on how you build your website and what you're wishes are.
You can build a new app and use it on your website to send and receive
your tweets, or just displaying an RSS feed of your tweets inside your
website. So tell us more what you are looking for! Did you build your
website by your own, using wordpress, or ...?

Martijn

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


Re: [twitter-dev] Tweet button doesn't work, stills in zero

2011-07-05 Thread Pablo Diaz
Thanks!
Sorry if I didn't explain well, because my problem is with the tweet button
and I just see a follow button in that page.
If there is something more, please notice me.
Thanks again

On Sat, Jul 2, 2011 at 5:07 AM, Mo'b Mo'b mobingapapi...@gmail.com wrote:

 Check the source of this page, ntwyt.com

 On Thu, Jun 30, 2011 at 7:21 PM, pablo diazz pmd...@gmail.com wrote:

 I'm putting on my site a tweet button generated using:http://
 twitter.com/goodies/tweetbutton

 I've twitted from different public accounts and the counter stills in
 zero.
 Is there some restriction on the domains used for the pages that
 includes twitter resources? Because my page is under the domain
 .mychnl.com. I've tested my code inside a google blog and works
 there, but in my page doesn't

 my code is very simple:

  script type=text/javascript src=http://platform.twitter.com/
 widgets.js http://platform.twitter.com/widgets.js/script
 a 
 href=http://twitter.com/share?count=verticalamp;via=pmdiazzhttp://twitter.com/share?count=verticalvia=pmdiazz
 
 class=twitter-share-buttonTweet/a

 Is there some conditions that should acomplish my page? Should include
 meta-tags or headers??
 I was testing using this url.api:
 http://urls.api.twitter.com/1/urls/count.json?url={MY_URL}
 is there another tool that can help me?

 Thanks in advance!!!

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




 --
 ©*InFiNiTy*. *Mobinga Inc*.

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




-- 
Pablo Diaz
pmd...@gmail.com

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


Re: [twitter-dev] Access level changed to Read, Write AND Direct Message but still can't access DMs!

2011-07-05 Thread Mo'b Mo'b
This again. Just keep trying it. Mine was also reverting. Just keep soaking
it, it'll stick.

-- 
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] Open DM availability only for Verified Accounts?

2011-07-05 Thread Ryan
Searched this forum and found nothing, but apparently you guys are rolling 
out a new feature for Verified accounts to be able to receive DM's without 
having to follow back each user.

See: 
http://thenextweb.com/twitter/2011/07/04/twitter-drops-following-requirement-for-direct-messages-on-verified-accounts/

This leads to multiple questions:

1) Is it possible for regular small businesses to gain verified status? Or 
is this just limited to mega brands/businesses?  Obviously this feature 
would be very helpful to more than just the select few verified business 
accounts.

2) Why not let any user apply this feature in their settings panel? If 
worried about DM spam, I don't really see the downside as they would only be 
inflicting spam on themselves. Any chance of this happening? 

3) Can verified users turn this off if its not desirable for their specific 
situation?  

Thanks,
Ryan

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


Re: [twitter-dev] Changed to authorizeURL; get the proper permission, but now get 401, 401 after one call

2011-07-05 Thread Abraham Williams
You don't need to change the code in twitteroauth.php. You just use
$connection-getAuthorizeURL($token, false) to get the authorize URL instead
of the authenticate URL.

If you are having other issues it is likely unrelated to this change as the
only difference is sending users to api.twitter.com/oauth/authorize instead
of api.twitter.com/oauth/authenticate. If you can make one call then you are
likely either not properly saving the access token in sessions/db or you are
overwriting it with a new request token at some point.

Abraham
-
Abraham Williams | InboxQ http://inboxq.com/ | abrah.am
@abraham https://twitter.com/intent/follow?screen_name=abraham |
github.com/abraham | blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.



On Mon, Jul 4, 2011 at 19:59, PeriVisioN perivis...@gmail.com wrote:

 Very confused.  I have abrahams API lib, works fine.   After the
 change, I updated my apps permission and then changed the following in
 his code.

  function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {

if (is_array($token)) {
  $token = $token['oauth_token'];
}
return $this-authorizeURL() . ?oauth_token={$token};
/*
if (empty($sign_in_with_twitter)) {
  echo 'calling authorizeURLbr';
  return $this-authorizeURL() . ?oauth_token={$token};
} else {
  echo 'calling authenticateURLbr'; return;
  return $this-authenticateURL() . ?oauth_token={$token};
}
*/
  }

 So I can make 1 call, but after that, its give me a 403
 Could not authenticate with OAuth. /1/account/verify_credentials.xml?

 Any thoughts

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


Re: [twitter-dev] Re: Application not getting R/W/DM access

2011-07-05 Thread Abraham Williams
To use oauth/authenticate in TwitterOAuth pass false as the second argument
of getAuthorizeURL.

$connection-getAuthorizeURL($token, false);

Abraham
-
Abraham Williams | InboxQ http://inboxq.com/ | abrah.am
@abraham https://twitter.com/intent/follow?screen_name=abraham |
github.com/abraham | blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.



On Mon, Jul 4, 2011 at 20:00, oosswwaalldd oosswwaal...@gmail.com wrote:

 I have the same problem, when you say Don't use /oauth/authenticate
 but /oauth/authorize where can I check if my lib is using that
 method? I am using Abraham Twitteroauth lib.

 I appreciate your help a lot!

 On Jul 4, 7:21 pm, Tom van der Woerdt i...@tvdw.eu wrote:
  1) Don't use xAuth
  2) Don't use /oauth/authenticate but /oauth/authorize
 
  Tom
 
  On 7/5/11 1:20 AM, DaveH wrote:
 
 
 
 
 
 
 
   Twitter Team:
 
   My application was changed weeks ago to request DM permission. My
   understanding was all we needed to do was edit the settings for the
   app, and then re-authenticate the application. Which I did. When I
   look at the app settings it shows that Read, Write, Direct Messages
   is selected.
 
   However, when I go to authorize the application, I see that my
   application will not not be able to access DMs.
 
   This is a white listed app that needs access to DMs to work. From what
   I can tell, it should be able to authenticate and get DM access as the
   application is registered as needed DM level.
 
   So why is it not being allowed the correct access level?

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


Re: [twitter-dev] lists.json API call ignoring the callback parameter as of the last few hours

2011-07-05 Thread Harshad RJ
Hi Taylor,

Any updates on this issue?

tDash users are not able to read their lists because of this.

thanks,
Harshad

On Sat, Jul 2, 2011 at 12:24 AM, Taylor Singletary 
taylorsinglet...@twitter.com wrote:

 Thanks everyone, I'll report this to the team -- not quite sure what's
 happening.

 Just to set expectations, I also don't have an ETA on a fix.

 @episod http://twitter.com/intent/user?screen_name=episod - Taylor
 Singletary




-- 
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: Application not getting R/W/DM access

2011-07-05 Thread oosswwaalldd
Thanks Abraham, i will change to FALSE and see what happens. I have
read in this group that making that change to false the oauth flow
works only onw time tha other times it gives a 403 error from Twitter.
Is that true?

On Jul 5, 1:20 pm, Abraham Williams 4bra...@gmail.com wrote:
 To use oauth/authenticate in TwitterOAuth pass false as the second argument
 of getAuthorizeURL.

 $connection-getAuthorizeURL($token, false);

 Abraham
 -
 Abraham Williams | InboxQ http://inboxq.com/ | abrah.am
 @abraham https://twitter.com/intent/follow?screen_name=abraham |
 github.com/abraham | blog.abrah.am
 This email is: [ ] shareable [x] ask first [ ] private.







 On Mon, Jul 4, 2011 at 20:00, oosswwaalldd oosswwaal...@gmail.com wrote:
  I have the same problem, when you say Don't use /oauth/authenticate
  but /oauth/authorize where can I check if my lib is using that
  method? I am using Abraham Twitteroauth lib.

  I appreciate your help a lot!

  On Jul 4, 7:21 pm, Tom van der Woerdt i...@tvdw.eu wrote:
   1) Don't use xAuth
   2) Don't use /oauth/authenticate but /oauth/authorize

   Tom

   On 7/5/11 1:20 AM, DaveH wrote:

Twitter Team:

My application was changed weeks ago to request DM permission. My
understanding was all we needed to do was edit the settings for the
app, and then re-authenticate the application. Which I did. When I
look at the app settings it shows that Read, Write, Direct Messages
is selected.

However, when I go to authorize the application, I see that my
application will not not be able to access DMs.

This is a white listed app that needs access to DMs to work. From what
I can tell, it should be able to authenticate and get DM access as the
application is registered as needed DM level.

So why is it not being allowed the correct access level?

  --
  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 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: Changed to authorizeURL; get the proper permission, but now get 401, 401 after one call

2011-07-05 Thread oosswwaalldd
I am little bit confused, I understood that the problem was solved by
changing to FALSE in this line
function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {
in twitteroauth.php, but I am reading from you that the change is not
in this file.

In my code the only call I have to authorize/authenticate is this
(main file where I process the DMs, this file requires
twitteroauth.php)

/* Create a TwitterOauth object with consumer/user tokens. */
$connection = new TwitterOAuth($consumer_key,$consumer_secret,
$oauth_token,$oauth_token_secret);

where am I supposed to change this FALSE?

Thanks for the help


On Jul 5, 12:45 pm, Abraham Williams 4bra...@gmail.com wrote:
 You don't need to change the code in twitteroauth.php. You just use
 $connection-getAuthorizeURL($token, false) to get the authorize URL instead
 of the authenticate URL.

 If you are having other issues it is likely unrelated to this change as the
 only difference is sending users to api.twitter.com/oauth/authorize instead
 of api.twitter.com/oauth/authenticate. If you can make one call then you are
 likely either not properly saving the access token in sessions/db or you are
 overwriting it with a new request token at some point.

 Abraham
 -
 Abraham Williams | InboxQ http://inboxq.com/ | abrah.am
 @abraham https://twitter.com/intent/follow?screen_name=abraham |
 github.com/abraham | blog.abrah.am
 This email is: [ ] shareable [x] ask first [ ] private.







 On Mon, Jul 4, 2011 at 19:59, PeriVisioN perivis...@gmail.com wrote:
  Very confused.  I have abrahams API lib, works fine.   After the
  change, I updated my apps permission and then changed the following in
  his code.

   function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {

     if (is_array($token)) {
       $token = $token['oauth_token'];
     }
     return $this-authorizeURL() . ?oauth_token={$token};
     /*
     if (empty($sign_in_with_twitter)) {
       echo 'calling authorizeURLbr';
       return $this-authorizeURL() . ?oauth_token={$token};
     } else {
       echo 'calling authenticateURLbr'; return;
       return $this-authenticateURL() . ?oauth_token={$token};
     }
     */
   }

  So I can make 1 call, but after that, its give me a 403
  Could not authenticate with OAuth. /1/account/verify_credentials.xml?

  Any thoughts

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


Re: [twitter-dev] API Bug: Malformed JSON returned for some requests

2011-07-05 Thread Taylor Singletary
Hi Idan,

Thank you very much for your detailed bug report. We're working on
identifying the underlying cause and hope to have a fix out for this next
week.

Thanks,
@episod http://twitter.com/intent/user?screen_name=episod - Taylor
Singletary


On Tue, Jul 5, 2011 at 12:41 AM, Idan Gazit i...@gazit.me wrote:

 *Full bug report is here: https://gist.github.com/1064338*


 Summary:

 The Twitter API returns malformed JSON for some valid requests.

 I discovered this while attempting to fetch all of my list memberships via
 the API. The issue is present regardless of authentication. It occurs 100%
 of the time, and has persisted for over twelve hours. I have reproduced it
 for multiple users.

 Note that the response does not indicate any error condition. The
 transaction completes successfully, but the payload is malformed.

 It seems that any user with enough lists will eventually have a page
 returned containing this bug. I've located it on the first two users I
 tried, which is my own account (@idangazit ~120 listed) and that of Jacob
 Kaplan-Moss (@jacobian, ~500 listed), founder of the Django web framework.

 The offending queries:

 These are two examples:


 http://api.twitter.com/1/idangazit/lists/memberships.json?cursor=1336796671888485791


 http://api.twitter.com/1/jacobian/lists/memberships.json?cursor=1343747472518328819

 Note that these are literally the first two users I inspected. I imagine
 this bug affects anybody with a sufficient number of lists. I have not
 encountered the issue in any other API call, but I haven't looked very hard,
 either.

 All of the following applies to my account, but is equally reproducible for
 @jacobian, albeit with different values.

 Starting with cursor=-1, the following (stable) progression of next_cursor 
 values
 lead to the broken query result:

- 2nd: 1370876429079454131
- 3rd: 1363944001883709517
- 4th: 1352913498669071334
- 5th: 1336796671888485791

 Each of the requests leading up to the offender return well-formed JSON.

 The problem is a superfluous empty value at the very end of the lists
 value, more easily seen on line 956 of the pretty-printed JSON attached to
 this gist. Pasting the JSON into a validity checker like
 http://jsonlint.com handily points out the invalid serialization.

 Interestingly, the developer console in Twitter for Mac munges the response
 to replace the trailing comma with null, thereby making it valid JSON
 (screenshot:http://cl.ly/1q072g380B0P3g213t3e). Regardless, the bytestream
 from the server contains invalid JSON.


 Raw and pretty-printed dumps of the transaction are available in the gist
 linked at the top of this post.


 Thanks!

 Idan (@idangazit)

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


Re: [twitter-dev] Re: Changed to authorizeURL; get the proper permission, but now get 401, 401 after one call

2011-07-05 Thread Abraham Williams
You don't need to change the TRUE to FALSE in twitteroauth.php you pass
FALSE as the second parameter when you call the getAuthorizeURL method. This
is only used when a (generally) unauthenticated user gets redirected to
twitter.com with a request token to allow access to their account. For all
existing users they will have to do this again before the access tokens will
have DM access.

In the example code this is done in line 22 of redirect.php
https://github.com/abraham/twitteroauth/blob/master/redirect.php#L22

Abraham
-
Abraham Williams | InboxQ http://inboxq.com/ | abrah.am
@abraham https://twitter.com/intent/follow?screen_name=abraham |
github.com/abraham | blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.



On Tue, Jul 5, 2011 at 14:58, oosswwaalldd oosswwaal...@gmail.com wrote:

 I am little bit confused, I understood that the problem was solved by
 changing to FALSE in this line
 function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {
 in twitteroauth.php, but I am reading from you that the change is not
 in this file.

 In my code the only call I have to authorize/authenticate is this
 (main file where I process the DMs, this file requires
 twitteroauth.php)

 /* Create a TwitterOauth object with consumer/user tokens. */
 $connection = new TwitterOAuth($consumer_key,$consumer_secret,
 $oauth_token,$oauth_token_secret);

 where am I supposed to change this FALSE?

 Thanks for the help


 On Jul 5, 12:45 pm, Abraham Williams 4bra...@gmail.com wrote:
  You don't need to change the code in twitteroauth.php. You just use
  $connection-getAuthorizeURL($token, false) to get the authorize URL
 instead
  of the authenticate URL.
 
  If you are having other issues it is likely unrelated to this change as
 the
  only difference is sending users to api.twitter.com/oauth/authorizeinstead
  of api.twitter.com/oauth/authenticate. If you can make one call then you
 are
  likely either not properly saving the access token in sessions/db or you
 are
  overwriting it with a new request token at some point.
 
  Abraham
  -
  Abraham Williams | InboxQ http://inboxq.com/ | abrah.am
  @abraham https://twitter.com/intent/follow?screen_name=abraham |
  github.com/abraham | blog.abrah.am
  This email is: [ ] shareable [x] ask first [ ] private.
 
 
 
 
 
 
 
  On Mon, Jul 4, 2011 at 19:59, PeriVisioN perivis...@gmail.com wrote:
   Very confused.  I have abrahams API lib, works fine.   After the
   change, I updated my apps permission and then changed the following in
   his code.
 
function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {
 
  if (is_array($token)) {
$token = $token['oauth_token'];
  }
  return $this-authorizeURL() . ?oauth_token={$token};
  /*
  if (empty($sign_in_with_twitter)) {
echo 'calling authorizeURLbr';
return $this-authorizeURL() . ?oauth_token={$token};
  } else {
echo 'calling authenticateURLbr'; return;
return $this-authenticateURL() . ?oauth_token={$token};
  }
  */
}
 
   So I can make 1 call, but after that, its give me a 403
   Could not authenticate with OAuth. /1/account/verify_credentials.xml?
 
   Any thoughts
 
   --
   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 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 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


Re: [twitter-dev] lists.json API call ignoring the callback parameter as of the last few hours

2011-07-05 Thread Taylor Singletary
Hi Harshad,

We hope to have a fix for this bug out next week, sorry for the
inconvenience in the meantime.

@episod http://twitter.com/intent/user?screen_name=episod - Taylor
Singletary


On Tue, Jul 5, 2011 at 10:44 AM, Harshad RJ harshad...@gmail.com wrote:

 Hi Taylor,

 Any updates on this issue?

 tDash users are not able to read their lists because of this.

 thanks,
 Harshad


 On Sat, Jul 2, 2011 at 12:24 AM, Taylor Singletary 
 taylorsinglet...@twitter.com wrote:

 Thanks everyone, I'll report this to the team -- not quite sure what's
 happening.

 Just to set expectations, I also don't have an ETA on a fix.

 @episod http://twitter.com/intent/user?screen_name=episod - Taylor
 Singletary


  --
 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 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: Changed to authorizeURL; get the proper permission, but now get 401, 401 after one call

2011-07-05 Thread oosswwaalldd
Turns out I use themattharris lib to get the login credentials (token
and token_secret) which I store on my db, and Abraham lib (yours) to
interact with Twitter once I am authenticated. I know this is not you
lib but Matt Harris's, but can you help me please to know where in the
mattharris lib should I change this method? I think it would be in the
line with the -- below. Because Twitter every two days (more than
less) gives me this error when I try to get DMs with an authenticated
user [error] - no permission to access to DMS (or some like that)
when I check the users Token and Secret in my app (dev.twitter.com/
apps) they are different than the ones stored on my db. I appreciate
you help a lot.

// start the OAuth dance
} elseif ( isset($_REQUEST['signin']) || isset($_REQUEST['allow']) ) {
  $callback = isset($_REQUEST['oob']) ? 'oob' : $here;

  $code = $tmhOAuth-request('POST', $tmhOAuth-url('oauth/
request_token', ''), array(
'oauth_callback' = $callback
  ));

  if ($code == 200) {
$_SESSION['oauth'] = $tmhOAuth-extract_params($tmhOAuth-
response['response']);
$method = isset($_REQUEST['signin']) ? 'authenticate' :
'authorize'; -- HERE SHOULD I WRITE $METHOD='authorize'; RIGHT?
$force  = isset($_REQUEST['force']) ? 'force_login=1' : '';
$forcewrite  = isset($_REQUEST['force_write']) ?
'oauth_access_type=write' : '';
$forceread  = isset($_REQUEST['force_read']) ?
'oauth_access_type=read' : '';
header(Location:  . $tmhOAuth-url(oauth/{$method}, '') .  ?
oauth_token={$_SESSION['oauth']['oauth_token']}{$force}{$forcewrite}
{$forceread});

  }



On Jul 5, 3:55 pm, Abraham Williams 4bra...@gmail.com wrote:
 You don't need to change the TRUE to FALSE in twitteroauth.php you pass
 FALSE as the second parameter when you call the getAuthorizeURL method. This
 is only used when a (generally) unauthenticated user gets redirected to
 twitter.com with a request token to allow access to their account. For all
 existing users they will have to do this again before the access tokens will
 have DM access.

 In the example code this is done in line 22 of 
 redirect.phphttps://github.com/abraham/twitteroauth/blob/master/redirect.php#L22

 Abraham
 -
 Abraham Williams | InboxQ http://inboxq.com/ | abrah.am
 @abraham https://twitter.com/intent/follow?screen_name=abraham |
 github.com/abraham | blog.abrah.am
 This email is: [ ] shareable [x] ask first [ ] private.







 On Tue, Jul 5, 2011 at 14:58, oosswwaalldd oosswwaal...@gmail.com wrote:
  I am little bit confused, I understood that the problem was solved by
  changing to FALSE in this line
  function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {
  in twitteroauth.php, but I am reading from you that the change is not
  in this file.

  In my code the only call I have to authorize/authenticate is this
  (main file where I process the DMs, this file requires
  twitteroauth.php)

  /* Create a TwitterOauth object with consumer/user tokens. */
  $connection = new TwitterOAuth($consumer_key,$consumer_secret,
  $oauth_token,$oauth_token_secret);

  where am I supposed to change this FALSE?

  Thanks for the help

  On Jul 5, 12:45 pm, Abraham Williams 4bra...@gmail.com wrote:
   You don't need to change the code in twitteroauth.php. You just use
   $connection-getAuthorizeURL($token, false) to get the authorize URL
  instead
   of the authenticate URL.

   If you are having other issues it is likely unrelated to this change as
  the
   only difference is sending users to api.twitter.com/oauth/authorizeinstead
   of api.twitter.com/oauth/authenticate. If you can make one call then you
  are
   likely either not properly saving the access token in sessions/db or you
  are
   overwriting it with a new request token at some point.

   Abraham
   -
   Abraham Williams | InboxQ http://inboxq.com/ | abrah.am
   @abraham https://twitter.com/intent/follow?screen_name=abraham |
   github.com/abraham | blog.abrah.am
   This email is: [ ] shareable [x] ask first [ ] private.

   On Mon, Jul 4, 2011 at 19:59, PeriVisioN perivis...@gmail.com wrote:
Very confused.  I have abrahams API lib, works fine.   After the
change, I updated my apps permission and then changed the following in
his code.

 function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {

   if (is_array($token)) {
     $token = $token['oauth_token'];
   }
   return $this-authorizeURL() . ?oauth_token={$token};
   /*
   if (empty($sign_in_with_twitter)) {
     echo 'calling authorizeURLbr';
     return $this-authorizeURL() . ?oauth_token={$token};
   } else {
     echo 'calling authenticateURLbr'; return;
     return $this-authenticateURL() . ?oauth_token={$token};
   }
   */
 }

So I can make 1 call, but after that, its give me a 403
Could not authenticate with OAuth. /1/account/verify_credentials.xml?

Any thoughts

--
Twitter developer documentation and 

[twitter-dev] R/W/DM app update not shown in app auth

2011-07-05 Thread oosswwaalldd
Hi, I al ready upgraded my app from R/W to R/W/DM, that was june 30th,
but still when a user enter to my site and it is re-directed to the
Twitter grant access page, the app page says that my app won't have
access to the user DMs, is there a problem with Twitter database or
should I miss a step. Tha app works fine but every day-day and a half
I have to tell the users to revoke and re-authorize my app in order to
work properly again.

Thanks in advance

-- 
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] Rate limiting questions

2011-07-05 Thread YupiqDZ
Hi,

I'm currently in the process of writing an application which
periodically gets directed messages from a user (once every 120
seconds checks if the user has new messages).

The API I am using is the Twitter4j library in Java. Here's the error
I get:

403:The request is understood, but it has been refused.  An
accompanying error message will explain why.
TwitterException{exceptionCode=[ece01d6a-01eb72d6], statusCode=403,
retryAfter=0,
rateLimitStatus=RateLimitStatusJSONImpl{remainingHits=326,
hourlyLimit=350, resetTimeInSeconds=1309899, secondsUntilReset=1629,
resetTime=Tue Jul 05 13:58:10 PDT 2011}, version=2.1.10}

I am confused as to how my remainingHIts is still 326 yet I am rate
limited? Additionally, even if I wait until the reset time indicated
before hitting the service again, I receive the rate limit exception
again with the reset time pushed back by an hour.

I am fairly confident that this service does not poll Twitter more
than 350 times a second, is there something else that could be causing
me to be rate limited?

Thanks

-- 
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] HTML fluff appearing in twitter feed box using TWTR.Widget

2011-07-05 Thread TDH
I am using TWTR.Widget in a Rails 3.0 app to display a list of recent
tweets. This has been working fine for the few weeks I have had it
implemented.

Yesterday, it starting displaying html tag information within each
tweet. Though no change was made to the TWTR.Widget call.

here is an example:

code
kimberlyella Beth Falcone and Jamie MacDonald Launch GiveCorps:@On the
GiveCorps website,@subscribers can make contributions ...
target=_blank@href=http://bit.ly/qdHPqj;http://bit.ly/qdHPqj
/code

Notice the target=_blank etc that is appearing.

I would greatly appreciate any hints as to what I might have done to
be seeing this change.

Tom

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


Re: [twitter-dev] Rate limiting questions

2011-07-05 Thread Taylor Singletary
Hi there,

This is actually a different error than your library may be leading you to
believe -- the library is suggesting that the 403 may be due to rate
limiting, but in this case it's actually due to a recent permission model
change.

The permission model gas change whereas requesting a user's direct messages
now requires a re-authorization at the appropriate access request level
(RWD). You can read more about the new permission model and what to do next
here: http://dev.twitter.com/pages/application-permission-model ..

@episod http://twitter.com/intent/user?screen_name=episod - Taylor
Singletary


On Tue, Jul 5, 2011 at 1:35 PM, YupiqDZ mrclea...@gmail.com wrote:

 Hi,

 I'm currently in the process of writing an application which
 periodically gets directed messages from a user (once every 120
 seconds checks if the user has new messages).

 The API I am using is the Twitter4j library in Java. Here's the error
 I get:

 403:The request is understood, but it has been refused.  An
 accompanying error message will explain why.
 TwitterException{exceptionCode=[ece01d6a-01eb72d6], statusCode=403,
 retryAfter=0,
 rateLimitStatus=RateLimitStatusJSONImpl{remainingHits=326,
 hourlyLimit=350, resetTimeInSeconds=1309899, secondsUntilReset=1629,
 resetTime=Tue Jul 05 13:58:10 PDT 2011}, version=2.1.10}

 I am confused as to how my remainingHIts is still 326 yet I am rate
 limited? Additionally, even if I wait until the reset time indicated
 before hitting the service again, I receive the rate limit exception
 again with the reset time pushed back by an hour.

 I am fairly confident that this service does not poll Twitter more
 than 350 times a second, is there something else that could be causing
 me to be rate limited?

 Thanks

 --
 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 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: R/W/DM app update not shown in app auth

2011-07-05 Thread Reivax
Hi,

You are probably the victim of a design singularity, that was
documented in a FAQ (yes, a FAQ)
I assume your application is using the oauth/authenticate url
Replace authenticate with authorize and you should be fine.

Accessing DM is not possible when using authenticate, for some reason

On 5 juil, 22:31, oosswwaalldd oosswwaal...@gmail.com wrote:
 Hi, I al ready upgraded my app from R/W to R/W/DM, that was june 30th,
 but still when a user enter to my site and it is re-directed to the
 Twitter grant access page, the app page says that my app won't have
 access to the user DMs, is there a problem with Twitter database or
 should I miss a step. Tha app works fine but every day-day and a half
 I have to tell the users to revoke and re-authorize my app in order to
 work properly again.

 Thanks in advance

-- 
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: Tweet button and iphone

2011-07-05 Thread anaj...@ibs.com.jo
Because of Lack of support by Twitter and we didn't face any such
issues with Facebook,we had no choice but to remove twitter from all
of our projects and use Facebook instead,Thanks to everyone who tried
to help .

-- 
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: Site Streams

2011-07-05 Thread Orian Marx
Mark, this is a great post, thanks for taking the time to write it up.
What I'm curious about is that I believe Site Streams is still in beta
and not supposed to be used in a production environment according to
Twitter. Has it been stable for you?

On Jun 28, 12:24 pm, Mark Krieger markskrie...@gmail.com wrote:
 We've gone live with Site Streams for paying customers of our
 TweetRoost product. I wrote a blog with technical details which some
 people might find interesting. See it 
 athttp://www.mediaroost.com/2011/06/tweetroost-goes-live-with-twitter-s...
 -- it is not a product blog or a pitch :) (and I am a big fan of Site
 Streams, it was a great project for us to implement)

 Mark Krieger
 President
 @mediaroost

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